From: Mike Snitzer <snitzer@redhat.com>
To: Marc Caubet <mcaubet@pic.es>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Alignment: XFS + LVM2
Date: Wed, 7 May 2014 11:27:57 -0400 [thread overview]
Message-ID: <20140507152757.GA30839@redhat.com> (raw)
In-Reply-To: <CAPrERe1-+T+PpQ1gTBUSKzCjKn498TbH45Jnsrf5hrLLHgUiqA@mail.gmail.com>
On Tue, May 06 2014 at 11:54am -0400,
Marc Caubet <mcaubet@pic.es> wrote:
> Hi all,
>
> I am trying to setup a storage pool with correct disk alignment and I hope
> somebody can help me to understand some unclear parts to me when
> configuring XFS over LVM2.
>
> Actually we have few storage pools with the following settings each:
>
> - LSI Controller with 3xRAID6
> - Each RAID6 is configured with 10 data disks + 2 for double-parity.
> - Each disk has a capacity of 4TB, 512e and physical sector size of 4K.
> - 3x(10+2) configuration was considered in order to gain best performance
> and data safety (less disks per RAID less probability of data corruption)
What is the chunk size used for these RAID6 devices?
Say it is 256K, you have 10 data devices, so the full stripe would be
2560K.
Which version of lvm2 and kernel are you using? Newer versions support
a striped LV stripesize that is not a power-of-2.
> >From the O.S. side we see:
>
> [root@stgpool01 ~]# fdisk -l /dev/sda /dev/sdb /dev/sdc
>
> Disk /dev/sda: 40000.0 GB, 39999997214720 bytes
> 255 heads, 63 sectors/track, 4863055 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disk identifier: 0x00000000
>
> Disk /dev/sdb: 40000.0 GB, 39999997214720 bytes
> 255 heads, 63 sectors/track, 4863055 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disk identifier: 0x00000000
>
> Disk /dev/sdc: 40000.0 GB, 39999997214720 bytes
> 255 heads, 63 sectors/track, 4863055 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disk identifier: 0x00000000
>
> The idea is to aggregate the above devices and show only 1 storage space.
> We did as follows:
>
> vgcreate dcvg_a /dev/sda /dev/sdb /dev/sdc
> lvcreate -i 3 -I 4096 -n dcpool -l 100%FREE -v dcvg_a
I'd imagine you'd want the stripesize of this striped LV to match the
underlying RAID6 stripesize no? So 2560K, e.g. -i 3 -I 2560
That makes for a very large full stripe through...
> Hence, stripe of the 3 RAID6 in a LV.
>
> And here is my first question: How can I check if the storage and the LV
> are correctly aligned?
>
> On the other hand, I have formatted XFS as follows:
>
> mkfs.xfs -d su=256k,sw=10 -l size=128m,lazy-count=1 /dev/dcvg_a/dcpool
>
> So my second question is, are the above 'su' and 'sw' parameters correct on
> the current LV configuration? If not, which values should I have and why?
> AFAIK su is the stripe size configured in the controller side, but in this
> case we have a LV. Also, sw is the number of data disks in a RAID, but
> again, we have a LV with 3 stripes, and I am not sure if the number of data
> disks should be 30 instead.
Newer versions of mkfs.xfs _should_ pick up the hints exposed (as
minimum_io_size and optimal_io_size) by the striped LV.
But if not you definitely don't want to be trying to pierce through the
striped LV config to establish settings of the underlying RAID6. Each
layer in the stack should respect the layer beneath it. So, if the
striped LV is configured how you'd like, you should only concern
yourself with the limits that have been established for the topmost
striped LV that you're layering XFS on.
next prev parent reply other threads:[~2014-05-07 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 15:54 [linux-lvm] Alignment: XFS + LVM2 Marc Caubet
2014-05-07 15:27 ` Mike Snitzer [this message]
2014-05-08 9:29 ` Marc Caubet
2014-06-04 5:39 ` Linda A. Walsh
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=20140507152757.GA30839@redhat.com \
--to=snitzer@redhat.com \
--cc=linux-lvm@redhat.com \
--cc=mcaubet@pic.es \
/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;
as well as URLs for NNTP newsgroup(s).