rescue: Add --suggest option to suggest mount commands.
[libguestfs.git] / align / virt-alignment-scan.pod
index e5e7e31..601c5e8 100755 (executable)
@@ -6,8 +6,6 @@ virt-alignment-scan - Check alignment of virtual machine partitions
 
 =head1 SYNOPSIS
 
- virt-alignment-scan [--options]
-
  virt-alignment-scan [--options] -d domname
 
  virt-alignment-scan [--options] -a disk.img [-a disk.img ...]
@@ -231,8 +229,10 @@ data combined, and the two blocks written back (4x I/O).
 New versions of the Linux kernel expose the physical and logical block
 size, and minimum and recommended I/O size.
 
-For a typical hard drive with 512 byte sectors:
+For a typical consumer hard drive with 512 byte sectors:
 
+ $ cat /sys/block/sda/queue/hw_sector_size
+ 512
  $ cat /sys/block/sda/queue/physical_block_size
  512
  $ cat /sys/block/sda/queue/logical_block_size
@@ -242,6 +242,19 @@ For a typical hard drive with 512 byte sectors:
  $ cat /sys/block/sda/queue/optimal_io_size
  0
 
+For a new consumer hard drive with 4Kbyte sectors:
+
+ $ cat /sys/block/sda/queue/hw_sector_size
+ 4096
+ $ cat /sys/block/sda/queue/physical_block_size
+ 4096
+ $ cat /sys/block/sda/queue/logical_block_size
+ 4096
+ $ cat /sys/block/sda/queue/minimum_io_size
+ 4096
+ $ cat /sys/block/sda/queue/optimal_io_size
+ 0
+
 For a NetApp LUN:
 
  $ cat /sys/block/sdc/queue/logical_block_size
@@ -257,8 +270,11 @@ The NetApp allows 512 byte accesses (but they will be very
 inefficient), prefers a minimum 4K I/O size, but the optimal I/O size
 is 64K.
 
-[Thanks to Mike Snitzer for providing NetApp data and additional
-information.]
+For detailed information about what these numbers mean, see
+L<http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html>
+
+[Thanks to Matt Booth for providing 4K drive data.  Thanks to Mike
+Snitzer for providing NetApp data and additional information.]
 
 =head2 1 MB PARTITION ALIGNMENT
 
@@ -274,24 +290,15 @@ will start at a multiple of 2048 sectors.
 
 =head2 SETTING ALIGNMENT
 
-Currently there is no virt tool for fixing alignment problems in
-guests.  This is a difficult problem to fix because simply moving
-partitions around breaks the bootloader, necessitating either manual
-reinstallation of the bootloader using a rescue disk, or complex and
-error-prone hacks.
-
-L<virt-resize(1)> does not change the alignment of the first
-partition, but it does align the second and subsequent partitions to a
-multiple of 64 or 128 sectors (depending on the version of
-virt-resize, 128 in virt-resize E<ge> 1.13.19).  For operating systems
-that have a separate boot partition, virt-resize could be used to
-align the main OS partition, so that the majority of OS accesses
-except at boot will be aligned.
-
-The easiest way to correct partition alignment problems is to
-reinstall your guest operating systems.  If you install operating
-systems from templates, ensure these have correct partition alignment
-too.
+L<virt-resize(1)> can change the alignment of the partitions of some
+guests.  Currently it can fully align all the partitions of all
+Windows guests, and it will fix the bootloader where necessary.  For
+Linux guests, it can align the second and subsequent partitions, so
+the majority of OS accesses except at boot will be aligned.
+
+Another way to correct partition alignment problems is to reinstall
+your guest operating systems.  If you install operating systems from
+templates, ensure these have correct partition alignment too.
 
 For older versions of Windows, the following NetApp document contains
 useful information: L<http://media.netapp.com/documents/tr-3747.pdf>