Additional Virtualization Discussions

Linux partition alignment

evilensky
7,205 Views

kb8190 describes using partitions and proper alignment for best performance.   We are using LVM exclusively without partitioning the device before hand.  Does running pvcreate on a whole device (in this case an mpath lun) fullfill this note:

"Note that this problem will not occur if partitions are not used on the LUNs (for example, if a filesystem is created directly on the LUN without partitioning).

6 REPLIES 6

evilensky
7,203 Views

A similar discussion has come up on the LVM mailing list.

Am I safe to assume that a device without any partitions at all, by definition, cannot be "mis-aligned" ?

amiller_1
7,203 Views

An authoritative answer on this would be VERY helpful. I'm in good shape when working with customers on both Windows and Netware (NSS is aligned by default which is quite nice) but I haven't been able to nail down the Linux side (which encompasses ext3, reiserfs, LVM, swap, etc.).

amiller_1
7,203 Views

Just coming back to this one....an official reply from NetApp would be fantastic.

evilensky
7,205 Views

Some Red Hat developers have clarified this for me.

Summary as I understand it:

  • No paritions means no parition alignment necessary
  • the alignment of lvm physical volumes should be a multiple of 4k.  The default is 64kb which will work fine for wafl.

Netapp folk:  Could you update kb8190 with this information even though it's specific to LVM2?  I think it would be helpful.

amiller_1
7,205 Views

Ok....if I'm following this correctly we don't need to do anything when putting LVM on a disk?

However, we do need to do something when creating the individual LV's? If so, the steps would be....?

(Pardon the request for cookbook stuff....but want to make sure I'm following)

evilensky
7,205 Views

Hi Andrew,

You can find a great collection of cook-book stuff for LVM is here.  Red Hat has excellent documentation on their site.

The takeaway to this thread for me has been the alignment issue; NetApp couldn't answer if the lack of a partition on a physical volume using Red Hat 4.6, meant that the device was aligned for WAFLs 4k boundary.  Red Hat's unofficial answer is that it was using the default properties found in their volume management stack.

Cheers,

Eugene

Public