We were re-partitioning a virtual disk to increase the size of an LVM's physical volume.
This is how we initially performed this:
$ fdisk /dev/sdb
# delete partition
fdisk> d
? 1
# create new partition
fdisk> n
? p
? 1
first cylinder? [ENTER]
last cylinder? [ENTER]
# set LVM type
fdisk> t
? 8e
fdisk> w
This led to the LVM not being recognized by Linux. I was puzzled and looked at a backup. The partition tables both started at 1 so that didn't seem like the problem. However, if I changed units (fdisk command u
) from cylinders to sectors, I noticed that the backup begun at sector 13 but the new partition started at sector 128.
When we corrected the beginning of the partition, everything went fine.
Can't get my head around the discrepancy in the conversion of units. Can someone help me understand?