Enrique Sanchez
2010-Jul-08 17:18 UTC
[Ocfs2-users] partition offset/alignment on SAN devices.
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. -- Enrique Sanchez Vela ------------------------------------------
Joel Becker
2010-Jul-08 18:17 UTC
[Ocfs2-users] partition offset/alignment on SAN devices.
On Thu, Jul 08, 2010 at 01:18:30PM -0400, Enrique Sanchez wrote:> 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?It will certainly work. The big danger is that you might fdisk the drive without thinking, stomping on the ocfs2 volume. Joel -- "Copy from one, it's plagiarism; copy from two, it's research." - Wilson Mizner Joel Becker Consulting Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
James Masson
2010-Jul-09 07:58 UTC
[Ocfs2-users] partition offset/alignment on SAN devices.
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.