X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=guestfs.pod;h=fdac80a66b76b3030a19c4dd2451161dc74bccd4;hb=61a1449b79e304bb8619e0781ec22cb600bedc01;hp=33b84d73fd64601792075c10a707eca26ba8050a;hpb=8869adf1e811d894088dbb0f371edc23299005c8;p=libguestfs.git
diff --git a/guestfs.pod b/guestfs.pod
index 33b84d7..fdac80a 100644
--- a/guestfs.pod
+++ b/guestfs.pod
@@ -217,29 +217,27 @@ L.
=head2 PARTITIONING
-To create MBR-style (ie. normal PC) partitions use one of the
-C variants. These calls use the external
-L command.
+In the common case where you want to create a single partition
+covering the whole disk, you should use the C
+call:
-The simplest call is:
-
- char *lines[] = { ",", NULL };
- guestfs_sfdiskM (g, "/dev/sda", lines);
-
-This will create a single partition on C called
-C covering the whole disk.
+ const char *parttype = "mbr";
+ if (disk_is_larger_than_2TB)
+ parttype = "gpt";
+ guestfs_part_disk (g, "/dev/sda", parttype);
In general MBR partitions are both unnecessarily complicated and
depend on archaic details, namely the Cylinder-Head-Sector (CHS)
-geometry of the disk. C allows you to specify sizes
-in megabytes instead of cylinders, which is a small win.
+geometry of the disk. C can be used to
+create more complex arrangements where the relative sizes are
+expressed in megabytes instead of cylinders, which is a small win.
C will choose the nearest cylinder to approximate the
requested size. There's a lot of crazy stuff to do with IDE and
virtio disks having different, incompatible CHS geometries, that you
-probably don't want to know about. My advice: make a single partition
-to cover the whole disk, then use LVM on top.
+probably don't want to know about.
-In future we aim to provide access to libparted.
+My advice: make a single partition to cover the whole disk, then use
+LVM on top.
=head2 UPLOADING