Monday, April 14, 2014

Linux fdisk - new partitions with first sector 2048 instead of 63

I have some quantity of ocfs2 partitions on the storage area. They were created several years before with first sector of partition as 63. Once I needed to resize ocfs2 file system by increasing size of the volume on the SAN, deleting ocfs2 partition, creating new larger at the same place and resizing ocfs2 file system. But I noticed  I couldn't create new partition using fdisk with start on 63 sector but on 2048 instead.

Such behaviour can be explained by versions of fdisk. Older fdisk used dos disk label by defaul, newer doesn't. So, using

# fdisk -c=dos /dev/name_of_device

has solved the issue.