Skip to contentSkip to conversation

label sector and non 512 byte sectors

linux-lvm Phillip Susi 3 participants 3 messages Dec 26, 2012 – Jan 3, 2013

lore
Share & tools
lore
#0 lore raw

The man page for pvcreate states that the label goes in the second sector. That means it SHOULD be at an offset of 4096 bytes when using 4096 byte sectors, but apparently it is still at an offset of 512 bytes.
Bug?

#1 lore raw
Quoted 4 lines · Phillip Susi

The man page for pvcreate states that the label goes in the second sector. That means it SHOULD be at an offset of 4096 bytes when using 4096 byte sectors, but apparently it is still at an offset of 512 bytes.
Bug?

We define a sector at 512 bytes. Always.

Some documentation could be improved to make that clearer.

Alasdair

#2 lore raw

On Jan 3, Alasdair G Kergon transmitted in part:

Quoted 9 lines · Phillip Susi
Quoted 4 lines

The man page for pvcreate states that the label goes in the second sector. That means it SHOULD be at an offset of 4096 bytes when using 4096 byte sectors, but apparently it is still at an offset of 512 bytes.
Bug?

We define a sector at 512 bytes. Always.

Some documentation could be improved to make that clearer.

And current storage devices always define a logical sector as 512 bytes, and the firmware takes care of the R/M/W (with caching) needed for partial or unaligned writes.

The physical sector size is important when *aligning* LVM segments, filesystem blocks, RAID clusters, etc.