[Ocfs2-users] partition offset/alignment on SAN devices.

James Masson james.masson at tradefair.com
Fri Jul 9 00:58:18 PDT 2010


On 08/07/10 18:18, Enrique Sanchez wrote:
> Hey folks,
> 
> I've been getting requests from the users that they want the OCFS2
> filesystems aligned to 64k boundaries, however, when I began the
> project, the dummy of me, created the OCFS2 filesystem on top of the
> whole disk device (no partition) for example, one of the SAN devices
> would show up as /dev/dm-10, I created the filesystem using the
> following command:
> 
> mkfs.ocfs2 -L SOMELABEL /dev/dm-10
> 
> 
> is this supported, am I safe or did I just shoot myself in the foot,
> mouth & brain?
> 
> 
> thank you,
> Enrique.
> 
> 

It's not a dumb thing to do... It'll probably be the most I/O optimal solution...

Assuming your SAN does something sensible and optimally fits new LUNs start sectors to raid-stripe
sizes sympathetically, you should be fine.

Apologies if you already know this bit...

This 64k (32/128k whatever) issue is usually only a problem if you've used a fdisk to create a
partition to put your data on. For hysterical reasons the first partition is created an arbitrary
amount of kb into the disk. This almost never lines up with the LUN raid-stripe. Then the I/O going
from app <> FS <> LUN <> disks overlaps block sizes - causing unnecessary I/O through the chain and
sub-optimal performance.

If you must use Dos partition tables - you can offset the first partition by 64k - that should give
you your alignment back.

Or you could use LVM if you want server-side storage management - LVM seems to create Logical
Volumes at sensible boundaries. But if you want that last bit of performance, LVM is an overhead in
itself...

James M

The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company.



More information about the Ocfs2-users mailing list