From f9ca93f2ba43a4cd794b377d59e0a321188bf066 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 10 Dec 2009 11:33:58 +0100 Subject: ui: add --align command-line option to specify mkpart alignment The new --align command-line option can have the following values: none: Use the minimum alignment allowed by the disk type cylinder: Align partitions to cylinders (the default) minimal: Use minimum alignment as given by the disk topology information optimal: Use optimum alignment as given by the disk topology information Note the "minimal" and "optimal" values will use layout information provided by the disk to align the logical partition table addresses to actual physical blocks on the disks. The "minimal" value is the minimum aligment needed to align the partition properly to physical blocks, which avoids performance degradation. Whereas the "optimum" alignment align's to a multiple of the physical block size in a way that guarantees optimal performance. The "minimal" and "optimal" values are useful only when parted is compiled with libblkid >= 2.17 and running on a kernel >= 2.6.31, otherwise they are equivalent to --align=none. * parted/parted.c (ALIGNMENT_ enum values): New enum. (options, options_help): Add --align option. (align_args, align_types, alignment): New global variables. (do_mkpart): Honor aligment variable. (_parse_options): handle --align option. * bootstrap.conf (gnulib_modules): Add argmatch. * NEWS: Mention the new --align option. * doc/parted.texi: Document --align option. * doc/C/parted.8: Likewise. --- doc/C/parted.8 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc/C') diff --git a/doc/C/parted.8 b/doc/C/parted.8 index 9909ba8..2a8992e 100644 --- a/doc/C/parted.8 +++ b/doc/C/parted.8 @@ -30,6 +30,26 @@ never prompts for user intervention .TP .B -v, --version displays the version +.TP +.B -a \fIalignment-type\fP, --align \fIalignment-type\fP +Set alignment for newly created partitions, valid alignment types are: +.RS +.IP none +Use the minimum alignment allowed by the disk type. +.IP cylinder +Align partitions to cylinders. +.IP minimal +Use minimum alignment as given by the disk topology information. This and +the opt value will use layout information provided by the disk to align the +logical partition table addresses to actual physical blocks on the disks. +The min value is the minimum aligment needed to align the partition properly to +physical blocks, which avoids performance degradation. +.IP optimal +Use optimum alignment as given by the disk topology information. This +aligns to a multiple of the physical block size in a way that guarantees +optimal performance. +.RE + .SH COMMANDS .TP .B [device] -- cgit v1.2.1