diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-12-30 22:46:29 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-12-30 22:46:29 +0000 |
commit | 1a9b7df8f2092701fdc5a77a4d9edfcaa1a20acf (patch) | |
tree | d1e71d40a905053a1f563f33cde06ba97e753128 | |
parent | 3f4dc56a32074a02b1b829bd7a91878f73022d1d (diff) | |
download | libguestfs-1a9b7df8f2092701fdc5a77a4d9edfcaa1a20acf.tar.gz libguestfs-1a9b7df8f2092701fdc5a77a4d9edfcaa1a20acf.tar.xz libguestfs-1a9b7df8f2092701fdc5a77a4d9edfcaa1a20acf.zip |
docs: Refresh guestfs(3)/MOUNTING
-rw-r--r-- | src/guestfs.pod | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/guestfs.pod b/src/guestfs.pod index 93f31e61..73657d08 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -162,27 +162,33 @@ NAMING> below. Before you can read or write files, create directories and so on in a disk image that contains filesystems, you have to mount those -filesystems using L</guestfs_mount>. If you already know that a disk -image contains (for example) one partition with a filesystem on that -partition, then you can mount it directly: +filesystems using L</guestfs_mount_options> or L</guestfs_mount_ro>. +If you already know that a disk image contains (for example) one +partition with a filesystem on that partition, then you can mount it +directly: - guestfs_mount (g, "/dev/sda1", "/"); + guestfs_mount_options (g, "", "/dev/sda1", "/"); where C</dev/sda1> means literally the first partition (C<1>) of the first disk image that we added (C</dev/sda>). If the disk contains -Linux LVM2 logical volumes you could refer to those instead (eg. C</dev/VG/LV>). +Linux LVM2 logical volumes you could refer to those instead +(eg. C</dev/VG/LV>). Note that these are libguestfs virtual devices, +and are nothing to do with host devices. If you are given a disk image and you don't know what it contains then you have to find out. Libguestfs can do that too: use L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and LVs, and either try mounting each to see what is mountable, or else examine them with L</guestfs_vfs_type> or -L</guestfs_file>. Libguestfs also has a set of APIs for inspection of -disk images (see L</INSPECTION> below). But you might find it easier -to look at higher level programs built on top of libguestfs, in +L</guestfs_file>. To list just filesystems, use +L</guestfs_list_filesystems>. + +Libguestfs also has a set of APIs for inspection of unknown disk +images (see L</INSPECTION> below). But you might find it easier to +look at higher level programs built on top of libguestfs, in particular L<virt-inspector(1)>. -To mount a disk image read-only, use L</guestfs_mount_ro>. There are +To mount a filesystem read-only, use L</guestfs_mount_ro>. There are several other variations of the C<guestfs_mount_*> call. =head2 FILESYSTEM ACCESS AND MODIFICATION |