Unsolved

This post is more than 5 years old

19 Posts

1434

May 15th, 2008 09:00

Alignment offset for linux/intel with LVM2 ?

I've read through the "EMC Clariion Best Practices For Fibre Channel Storage" guide and I'm not sure the alignment offset issue applies to me.
It mentions there that windows and linux on intel both want to write a disk signature onto the lun and therefore the disks get misaligned causing disk crossing. It then goes on to explain how you can set the alignment on a linux host via fdisk saying that would be the better method than setting it on the clariion side.

I'm not gonna create partition tables at all ! Instead I'll use straight luns with LVM2.
Here's what I plan on doing:
Let's say I have a lun assigned to a linux host and the host sees it as /dev/emcpowera I'll do this:

/usr/sbin/pvcreate /dev/emcpowera
/usr/sbin/vgcreate VGtest /dev/emcpowera
/usr/sbin/lvcreate -n LVtest -L 10G VGtest

Even if I wanted to set the allignment via fdisk I couldn't because a partition table is missing

/sbin/fdisk -l /dev/emcpowera

Disk /dev/emcpowera: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Disk /dev/emcpowera doesn't contain a valid partition table

If I was to set it via fdisk I'd destroy the PV metadata that pvcreate had just written so I clearly can't do that.

My initial thought was that the alignment issue doesn't apply to me but then I realized that pvcreate also writes metadata to the lun as well as vgcreate. I'm not even sure where lvcreate writes its metadata but the point is : There is some metadata written to the beginning of the lun as well. Your guide only mentions the partition table metadata as an alignment offset problem. It doesn't mention host based volume managers in that section at all.

Q1 : Do I still need to set this alignment offset when using LVM2 without a partiton table ?

Q2: I'm also planning on handing some luns over to the dba's raw so linux won't write anything to them at all but I have no clue what metadata oracle might write to them once it gets a hold of them.

Could someone please explain this further for my scenario or point me to a document that describes how this alignment needs to be set with LVM2 and/or raw luns if applicable ?

2 Intern

 • 

1.3K Posts

May 18th, 2008 08:00

I am not sure why "alignment needs to be set with LVM2" is really needed here.

fdisk and pvcreate/lvm are two separe disk partition management tool both write information to the disks.

Interms of raw disks giving to DBA , for what they will be used.? If they meant for ASM database then an asm header information is written to disks.

19 Posts

May 21st, 2008 12:00

I opened a ticket about it with emc and after a long discussion we came to the conclusion that the only time you need to deal with this is when you use a partition table because of it's 63 block size.
I don't ever use partition tables. Instead I just take the luns, add them to VG's and then create LV's. Then I put ext3 straight onto the LV without a partition table.
Since I use the entire LV there is no need for a partition table so I don't have to worry about the offset.

1 Message

March 29th, 2010 08:00

I still dont get it. In case of LVM2 w/o partition table, does the file system (ext3) in your case starts at block 0 of the LUN? If yes, then where does the LVM2 metadata (PV signatures and such) get written? For the sake of offset/alignment discussion LVM2 metadata serves the role similar to MSDOS MBR (parition table + boot loader), doesn't it?

No Events found!

Top