Skip to contentSkip to conversation

pvcreate and partition alignment

linux-lvm Eugene Vilensky 3 participants 6 messages Mar 12, 2009

lore
Share & tools
lore
#0 lore raw

Greetings,

NetApp requires for best performance that all partitions be aligned to 4k boundaries to prevent "partial writes" and lost IOPS. We are using LVM on un-partitioned devices. The only response I can get out of NetApp is that, by not having a partition, the partition itself is not mis-aligned.

We are using a blocksize of 4096b for ext3.

Is there another "allocation" setting that we need to select for LVM specifically, to ensure alignment to this 4k NetApp boundary?

Thanks,
Eugene

#1 lore raw
Quoted 2 lines · Eugene Vilensky

Is there another "allocation" setting that we need to select for LVM specifically, to ensure alignment to this 4k NetApp boundary?

The default alignment should (64k) work fine if you've no other layers like partitions in between.

Alasdair

Signature · 1 line
[email protected]
#2 lore raw
In reply to Eugene Vilensky
Quoted 7 lines · Eugene Vilensky

Greetings,

NetApp requires for best performance that all partitions be aligned to 4k boundaries to prevent "partial writes" and lost IOPS. We are using LVM on un-partitioned devices. The only response I can get out of NetApp is that, by not having a partition, the partition itself is not mis-aligned.

You need to make sure that the extents on the PV have the correct alignment.

Quoted 4 lines

We are using a blocksize of 4096b for ext3.

Is there another "allocation" setting that we need to select for LVM specifically, to ensure alignment to this 4k NetApp boundary?

See this thread on lvm-devel last month:

https://www.redhat.com/archives/lvm-devel/2009-January/msg00148.html

Regards,
Bryn.

#3 lore raw
Quoted 5 lines

You need to make sure that the extents on the PV have the correct alignment.

Thank you both. So the default is 64k which is a multiple of 4k which means we are OK since we are not using partitions?

#4 lore raw
Quoted 5 lines

Thank you both. So the default is 64k which is a multiple of 4k which means we are OK since we are not using partitions?

This is on RHEL 4.6/4.7.

#5 lore raw
In reply to Eugene Vilensky
Quoted 7 lines · Eugene Vilensky

You need to make sure that the extents on the PV have the correct
alignment.

Thank you both. So the default is 64k which is a multiple of 4k which means we are OK since we are not using partitions?

Yes - as you're not using partitions you should be fine.

Regards,
Bryn.