1753716 Members
4746 Online
108799 Solutions
New Discussion юеВ

Re: Linux fdisk & LVM

 
SOLVED
Go to solution
SAM_24
Frequent Advisor

Linux fdisk & LVM

Hi,

If am going to you san disks to put under lvm, do I still need to create fdisk with option 8e?

Can you please shed light on this? Some people say it is required & some say not.

Thanks.
Never quit
4 REPLIES 4
Randy Jones_3
Trusted Contributor
Solution

Re: Linux fdisk & LVM

fdisk is not required. You can do a pvcreate first and specify the path to your SAN allocation or the multipath name.

Some people use fdisk first to try to enhance performance by track-aligning the starting block of the empty space. The SANs I have used have been quite good at hiding the information on physical placement that is necessary for such alignment. The two times I went to the extra work of locating the space and using fdisk to adjust the starting block I found that the buffering and I/O reordering that the SAN controller was doing made the performance increase negligible.
SAM_24
Frequent Advisor

Re: Linux fdisk & LVM

Randy, Thanks.
Never quit
Don Mallory
Trusted Contributor

Re: Linux fdisk & LVM

If you are using an HP EVA or EMC CX array, if you do not align the partition, you can see up to a 50% loss of performance, or overhead on the array.

This is easily verifiable on the EMC arrays using the NaviAnalyser tools. As a result, I always align partitions using diskpart (Windows) or fdisk (Linux).



Matti_Kurkela
Honored Contributor

Re: Linux fdisk & LVM

pvcreate can align the data too.

With older Linux distributions using the 2.6 series kernel (and thus LVM2), you can use the "--metadatasize 250k" to achieve a 256k alignment for your data. That is not very intuitive, so newer versions of LVM utilities include two options for the purpose of explicitly specifying the data alignment: "--dataalignment" and "--dataalignmentoffset".

You can verify the alignment of each existing LVM PV with "pvs -o +pe_start".

If you use partitions to align your data, fdisk will require you to calculate the proper alignment yourself. On the other hand, if you use parted to create the partitions, it includes at least some support for automatic alignment (disclaimers: may depend on your distribution version, I haven't tested this yet).

MK
MK