public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stan Hoeppner <stan@hardwarefreak.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: Optimal XFS formatting options?
Date: Mon, 16 Jan 2012 21:31:59 -0600	[thread overview]
Message-ID: <4F14EBAF.10808@hardwarefreak.com> (raw)
In-Reply-To: <20120116231121.GB6922@dastard>

On 1/16/2012 5:11 PM, Dave Chinner wrote:
> On Sun, Jan 15, 2012 at 10:56:22PM -0600, Stan Hoeppner wrote:
>> On 1/15/2012 6:27 PM, MikeJeezy wrote:
>>> I would like to align the partiton as well, but I am not sure how to acheive
>>> this using parted.  This will be the only partition on the LUN, so not sure
>>> if I even need to create one (although I do like to stay consistent with my
>>> other volumes). 
>>
>> If your drives have 512 byte physical sectors (not advanced format
>> drives with 4096 byte sectors) then there is no need to worry about
>> partition alignment.
> 
> That is incorrect. Partitions need to be aligned to the underlying
> stripe configuration, regardless of the sector size of the drives
> that make up the stripe. If you do not align the partition to the
> stripe, then the filesystem will be unaligned no matter how you
> configure it. Every layer of the storage stack under the filesystem
> needs to be correctly aligned and sized for filesystem alignment to
> make any difference to performance.

Thanks for the correction/reminder Dave.  So in this case the first
sector of the first partition would need to reside at LBA1280 in this
array (655360 byte stripe width, 1280 sectors/stripe), as the partition
table itself is going to occupy some sectors at the beginning of the
first stripe.  By creating the partition at LBA1280 we make sure the
first sector of the XFS filesystem is aligned with the first sector of
the 2nd stripe.

This exercise demonstrates why it's often preferable to directly format
the LUN.  If you don't have a _need_ for a partition table, such as
cloning/backup software that works at the partition level, or something
of that nature, avoid partitions.

>>> Any thoughts on partition alignment or
>>> other thoughts in general?  Thank you.
>>
>> Yes, don't use partitions if you don't need to divide your disk device
>> (LUN/virtual disk) into multiple pieces.  Now, if you need to make use
>> of snapshots or other volume management features, you may want to create
>> an LVM device on top of the disk device (LUN) and then make your XFS on
>> top of the LVM device.  If you have no need for LVM features, I'd say
>> directly format the LUN with XFS, no partition table necessary.
> 
> If you use LVM, then you need to ensure that it is slicing up the
> device in a manner that is aligned correctly to the underlying
> stripe, just like if you are using partitions to provide the same
> functionality. Different technologies, same problem.

If he's doing a single LVM volume then alignment should be automatic
during mkfs.xfs shouldn't it?

-- 
Stan


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-01-17  3:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-14 17:44 Optimal XFS formatting options? MikeJeezy
2012-01-14 22:23 ` Stan Hoeppner
2012-01-16  0:27   ` MikeJeezy
2012-01-16  4:56     ` Stan Hoeppner
2012-01-16 23:11       ` Dave Chinner
2012-01-17  3:31         ` Stan Hoeppner [this message]
2012-01-17  9:19           ` Michael Monnerie
2012-01-17 11:17             ` Emmanuel Florac
2012-01-17 11:34             ` Stan Hoeppner
2012-01-20 15:52               ` Michael Monnerie
2012-01-20 22:44                 ` Stan Hoeppner
2012-01-24 10:31                   ` Michael Monnerie
2012-01-15  1:14 ` Peter Grandi
2012-01-20  9:03   ` Linda Walsh
2012-01-20 12:06     ` Peter Grandi
2012-01-20 15:55       ` Michael Monnerie
2012-01-23  4:21       ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F14EBAF.10808@hardwarefreak.com \
    --to=stan@hardwarefreak.com \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox