X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=perl%2Flib%2FSys%2FGuestfs.pm;h=2d75b69fe978d63eb4642670a9f9a00f482ae924;hp=3d1493b59e82bf1dfc2b2127f8c6c50a2a9050c7;hb=62df226f26bd6ac3c481a7790eb89d760d2f0386;hpb=8f9f02d483b87c787d089cf9329f5f1b81d3a77e diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 3d1493b..2d75b69 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -468,10 +468,33 @@ The exact command which runs is C. Note in particular that the filename is not prepended to the output (the C<-b> option). +=item $status = $h->fsck ($fstype, $device); + +This runs the filesystem checker (fsck) on C which +should have filesystem type C. + +The returned integer is the status. See L for the +list of status codes from C, and note that multiple +status codes can be summed together. + +It is entirely equivalent to running C. +Note that checking or repairing NTFS volumes is not supported +(by linux-ntfs). + =item $autosync = $h->get_autosync (); Get the autosync flag. +=item $label = $h->get_e2label ($device); + +This returns the ext2/3/4 filesystem label of the filesystem on +C. + +=item $uuid = $h->get_e2uuid ($device); + +This returns the ext2/3/4 filesystem UUID of the filesystem on +C. + =item $path = $h->get_path (); Return the current search path. @@ -608,6 +631,14 @@ and physical volumes. B. +=item $h->lvremove ($device); + +Remove an LVM logical volume C, where C is +the path to the LV, such as C. + +You can also remove all LVs in a volume group by specifying +the VG name, C. + =item @logvols = $h->lvs (); List all the logical volumes detected. This is the equivalent @@ -687,6 +718,15 @@ This creates an LVM physical volume on the named C, where C should usually be a partition name such as C. +=item $h->pvremove ($device); + +This wipes a physical volume C so that LVM will no longer +recognise it. + +The implementation uses the C command which refuses to +wipe physical volumes that contain any volume groups, so you have +to remove those first. + =item @physvols = $h->pvs (); List all the physical volumes detected. This is the equivalent @@ -731,9 +771,13 @@ Remove the single directory C. =item $h->set_autosync ($autosync); If C is true, this enables autosync. Libguestfs will make a -best effort attempt to run C<$h-Esync> when the handle is closed +best effort attempt to run C<$h-Eumount_all> followed by +C<$h-Esync> when the handle is closed (also if the program exits without closing handles). +This is disabled by default (except in guestfish where it is +enabled by default). + =item $h->set_busy (); This sets the state to C. This is only used when implementing @@ -741,6 +785,25 @@ actions using the low-level API. For more information on states, see L. +=item $h->set_e2label ($device, $label); + +This sets the ext2/3/4 filesystem label of the filesystem on +C to C