X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfish-actions.pod;h=fa82ef1b11853c4a25f9496bf0e6d311af287738;hp=7b5a4bed6d959d2aef75baad36e52dfd46ab5fdc;hb=5abae435f0cb239b70878968e040d61a6730b897;hpb=d901cc916102f1aaccfb73396b48aa303e5b8cd7 diff --git a/guestfish-actions.pod b/guestfish-actions.pod index 7b5a4be..fa82ef1 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -484,6 +484,17 @@ Setting C to 3 should drop everything. This automatically calls L before the operation, so that the maximum guest memory is freed. +=head2 e2fsck-f + + e2fsck-f device + +This runs C, ie. runs the ext2/ext3 +filesystem checker on C, noninteractively (C<-p>), +even if the filesystem appears to be clean (C<-f>). + +This command is only needed because of C +(q.v.). Normally you should use C. + =head2 equal equal file1 file2 @@ -514,6 +525,35 @@ The exact command which runs is C. Note in particular that the filename is not prepended to the output (the C<-b> option). +=head2 find + + find directory + +This command lists out all files and directories, recursively, +starting at C. It is essentially equivalent to +running the shell command C but some +post-processing happens on the output, described below. + +This returns a list of strings I. Thus +if the directory structure was: + + /tmp/a + /tmp/b + /tmp/c/d + +then the returned list from C C would be +4 elements: + + a + b + c + c/d + +If C is not a directory, then this command returns +an error. + +The returned list is sorted. + =head2 fsck fsck fstype device @@ -777,6 +817,14 @@ the path to the LV, such as C. You can also remove all LVs in a volume group by specifying the VG name, C. +=head2 lvresize + + lvresize device mbytes + +This resizes (expands or shrinks) an existing LVM logical +volume to C. When reducing, data in the reduced part +is lost. + =head2 lvs lvs @@ -905,6 +953,13 @@ The implementation uses the C command which refuses to wipe physical volumes that contain any volume groups, so you have to remove those first. +=head2 pvresize + + pvresize device + +This resizes (expands or shrinks) an existing LVM physical +volume to match the new size of the underlying device. + =head2 pvs pvs @@ -938,6 +993,19 @@ Note that this function cannot correctly handle binary files as end of line). For those you need to use the C function which has a more complex interface. +=head2 resize2fs + + resize2fs device + +This resizes an ext2 or ext3 filesystem to match the size of +the underlying device. + +I It is sometimes required that you run C +on the C before calling this command. For unknown reasons +C sometimes gives an error about this and sometimes not. +In any case, it is always safe to call C before +calling this function. + =head2 rm rm path @@ -1064,9 +1132,53 @@ To create a single partition occupying the whole disk, you would pass C as a single element list, when the single element being the string C<,> (comma). +See also: C, C + B. +=head2 sfdisk-N + + sfdisk-N device n cyls heads sectors line + +This runs L option to modify just the single +partition C (note: C counts from 1). + +For other parameters, see C. You should usually +pass C<0> for the cyls/heads/sectors parameters. + +B. + +=head2 sfdisk-disk-geometry + + sfdisk-disk-geometry device + +This displays the disk geometry of C read from the +partition table. Especially in the case where the underlying +block device has been resized, this can be different from the +kernel's idea of the geometry (see C). + +The result is in human-readable format, and not designed to +be parsed. + +=head2 sfdisk-kernel-geometry + + sfdisk-kernel-geometry device + +This displays the kernel's idea of the geometry of C. + +The result is in human-readable format, and not designed to +be parsed. + +=head2 sfdisk-l + + sfdisk-l device + +This displays the partition table on C, in the +human-readable output of the L command. It is +not intended to be parsed. + =head2 stat stat path @@ -1217,6 +1329,33 @@ See also C. Use C<-> instead of a filename to read/write from stdin/stdout. +=head2 vg-activate + + vg-activate true|false 'volgroups ...' + +This command activates or (if C is false) deactivates +all logical volumes in the listed volume groups C. +If activated, then they are made known to the +kernel, ie. they appear as C devices. If deactivated, +then those devices disappear. + +This command is the same as running C + +Note that if C is an empty list then B volume groups +are activated or deactivated. + +=head2 vg-activate-all + + vg-activate-all true|false + +This command activates or (if C is false) deactivates +all logical volumes in all volume groups. +If activated, then they are made known to the +kernel, ie. they appear as C devices. If deactivated, +then those devices disappear. + +This command is the same as running C + =head2 vgcreate vgcreate volgroup 'physvols ...'