[ale] PSA: Pay attention to your sector alignment

Ted W ted-lists at xy0.org
Tue Sep 23 11:56:31 EDT 2014


When resizing a partition using fdisk, it's important to take note of 
the starting position of the original partition before creating the new 
partition. Apparently fdisk, by default, uses track-alignment starting 
at position 63 where as newer partitioning tools (e.g. parted) aligns to 
the 1MiB boundry, starting at 2048. If you wish to still use fdisk to 
resize a partition starting at 2048 you can use `fdisk -u -c /dev/sdX` 
to ignore MsDOS compatibility and default to 2048 as the starting position.

I just spent 5 hours last night fearing I had somehow munged my /srv 
partition while resizing the disk because the new partition table had 
the wrong starting point thanks to fdisk. Once I shifted the start point 
to 2048, all was fine. One more lesson well learned.

-- 
Ted W. <ted at xy0.org>


More information about the Ale mailing list