* [linux-lvm] Advanced Format disks mixed with regular disks?
@ 2011-03-14 16:47 Ron Johnson
2011-03-14 17:17 ` Mike Snitzer
0 siblings, 1 reply; 22+ messages in thread
From: Ron Johnson @ 2011-03-14 16:47 UTC (permalink / raw)
To: linux-lvm
Hi,
Is there any concern with mixing 4KB-sector drives with 512-byte
sector drives in the same LV?
Sincerely,
Ron
--
I prefer banana-flavored energy bars made from tofu.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 16:47 [linux-lvm] Advanced Format disks mixed with regular disks? Ron Johnson
@ 2011-03-14 17:17 ` Mike Snitzer
2011-03-14 17:32 ` Les Mikesell
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Mike Snitzer @ 2011-03-14 17:17 UTC (permalink / raw)
To: Ron Johnson; +Cc: linux-lvm
On Mon, Mar 14 2011 at 12:47pm -0400,
Ron Johnson <ron.l.johnson@cox.net> wrote:
> Hi,
>
> Is there any concern with mixing 4KB-sector drives with 512-byte
> sector drives in the same LV?
Both LVM2 and Device Mapper have been updated to accommodate stacking
such a mix of drives.
See this for a bit more detail:
http://people.redhat.com/msnitzer/docs/io-limits.txt
Particularly, the "Stacking I/O Limits" section.
The concern raised for partial (4k) writes to the 512b drive was
discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 17:17 ` Mike Snitzer
@ 2011-03-14 17:32 ` Les Mikesell
2011-03-14 18:02 ` Mike Snitzer
2011-03-14 19:13 ` Ron Johnson
2011-03-16 20:45 ` Phillip Susi
2 siblings, 1 reply; 22+ messages in thread
From: Les Mikesell @ 2011-03-14 17:32 UTC (permalink / raw)
To: linux-lvm
On 3/14/2011 12:17 PM, Mike Snitzer wrote:
>
>> Is there any concern with mixing 4KB-sector drives with 512-byte
>> sector drives in the same LV?
>
> Both LVM2 and Device Mapper have been updated to accommodate stacking
> such a mix of drives.
>
> See this for a bit more detail:
> http://people.redhat.com/msnitzer/docs/io-limits.txt
>
> Particularly, the "Stacking I/O Limits" section.
>
> The concern raised for partial (4k) writes to the 512b drive was
> discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
Are there any version-level hints about when/where these changes appear
and come together in the real world (i.e. distributions like RHEL,
debian, Ubuntu)?
--
Les Mikesell
lesmikesell@gmail.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 17:32 ` Les Mikesell
@ 2011-03-14 18:02 ` Mike Snitzer
2011-03-14 18:09 ` Ron Johnson
0 siblings, 1 reply; 22+ messages in thread
From: Mike Snitzer @ 2011-03-14 18:02 UTC (permalink / raw)
To: LVM general discussion and development
On Mon, Mar 14 2011 at 1:32pm -0400,
Les Mikesell <lesmikesell@gmail.com> wrote:
> On 3/14/2011 12:17 PM, Mike Snitzer wrote:
> >
> >>Is there any concern with mixing 4KB-sector drives with 512-byte
> >>sector drives in the same LV?
> >
> >Both LVM2 and Device Mapper have been updated to accommodate stacking
> >such a mix of drives.
> >
> >See this for a bit more detail:
> >http://people.redhat.com/msnitzer/docs/io-limits.txt
> >
> >Particularly, the "Stacking I/O Limits" section.
> >
> >The concern raised for partial (4k) writes to the 512b drive was
> >discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
>
> Are there any version-level hints about when/where these changes
> appear and come together in the real world (i.e. distributions like
> RHEL, debian, Ubuntu)?
For the kernel, the bulk of associated infrastructure (ata, scsi, block,
dm, md, etc) went in 2.6.31, 2.6.32 saw some improvements, and 2.6.33
and 2.6.34 saw a few bug fixes.
v2.6.32.11 saw a backport of the 2.6.33 and 2.6.34 bug fixes via commit
9b2ff97
RHEL6 has all this. I cannot speak for debian and/or Ubuntu.
As for LVM2, you'd want >= 2.02.62.
Mike
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 18:02 ` Mike Snitzer
@ 2011-03-14 18:09 ` Ron Johnson
0 siblings, 0 replies; 22+ messages in thread
From: Ron Johnson @ 2011-03-14 18:09 UTC (permalink / raw)
To: linux-lvm
On 03/14/2011 01:02 PM, Mike Snitzer wrote:
> On Mon, Mar 14 2011 at 1:32pm -0400,
> Les Mikesell<lesmikesell@gmail.com> wrote:
>
>> On 3/14/2011 12:17 PM, Mike Snitzer wrote:
>>>
>>>> Is there any concern with mixing 4KB-sector drives with 512-byte
>>>> sector drives in the same LV?
>>>
>>> Both LVM2 and Device Mapper have been updated to accommodate stacking
>>> such a mix of drives.
>>>
>>> See this for a bit more detail:
>>> http://people.redhat.com/msnitzer/docs/io-limits.txt
>>>
>>> Particularly, the "Stacking I/O Limits" section.
>>>
>>> The concern raised for partial (4k) writes to the 512b drive was
>>> discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
>>
>> Are there any version-level hints about when/where these changes
>> appear and come together in the real world (i.e. distributions like
>> RHEL, debian, Ubuntu)?
>
> For the kernel, the bulk of associated infrastructure (ata, scsi, block,
> dm, md, etc) went in 2.6.31, 2.6.32 saw some improvements, and 2.6.33
> and 2.6.34 saw a few bug fixes.
>
> v2.6.32.11 saw a backport of the 2.6.33 and 2.6.34 bug fixes via commit
> 9b2ff97
>
> RHEL6 has all this. I cannot speak for debian and/or Ubuntu.
>
> As for LVM2, you'd want>= 2.02.62.
>
Thanks...
$ cat /etc/debian_version
wheezy/sid
$ /sbin/lvm version
LVM version: 2.02.84(2) (2011-02-09)
Library version: 1.02.63 (2011-02-09)
$ uname -r
2.6.37-2-amd64
--
I prefer banana-flavored energy bars made from tofu.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 17:17 ` Mike Snitzer
2011-03-14 17:32 ` Les Mikesell
@ 2011-03-14 19:13 ` Ron Johnson
2011-03-14 20:00 ` Mike Snitzer
2011-03-15 0:15 ` John Drescher
2011-03-16 20:45 ` Phillip Susi
2 siblings, 2 replies; 22+ messages in thread
From: Ron Johnson @ 2011-03-14 19:13 UTC (permalink / raw)
To: linux-lvm
On 03/14/2011 12:17 PM, Mike Snitzer wrote:
> On Mon, Mar 14 2011 at 12:47pm -0400,
> Ron Johnson<ron.l.johnson@cox.net> wrote:
>
>> Hi,
>>
>> Is there any concern with mixing 4KB-sector drives with 512-byte
>> sector drives in the same LV?
>
> Both LVM2 and Device Mapper have been updated to accommodate stacking
> such a mix of drives.
>
> See this for a bit more detail:
> http://people.redhat.com/msnitzer/docs/io-limits.txt
>
> Particularly, the "Stacking I/O Limits" section.
>
> The concern raised for partial (4k) writes to the 512b drive was
> discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
>
Does this mean that util-linux v2.17.1 fdisk correctly handle AF
disks? (Note that I will *not* be booting off an AF device.)
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.17/v2.17.1-ReleaseNotes
fdisk:
- cleanup alignment, default to 1MiB offset [Karel Zak]
- don't check alignment_offset against geometry [Karel Zak]
- fallback for topology values [Karel Zak]
- fix ALIGN_UP [Karel Zak]
- fix check_alignment() [Karel Zak]
- fix default first sector [Karel Zak]
- use "optimal I/O size" in warnings [Karel Zak]
- use 1MiB offset and grain always when possible [Karel Zak]
- use more elegant way to count and check alignment [Karel Zak]
- use optimal_io_size [Karel Zak]
--
I prefer banana-flavored energy bars made from tofu.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 19:13 ` Ron Johnson
@ 2011-03-14 20:00 ` Mike Snitzer
2011-03-15 8:02 ` Karel Zak
2011-03-15 0:15 ` John Drescher
1 sibling, 1 reply; 22+ messages in thread
From: Mike Snitzer @ 2011-03-14 20:00 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Karel Zak
On Mon, Mar 14 2011 at 3:13pm -0400,
Ron Johnson <ron.l.johnson@cox.net> wrote:
> On 03/14/2011 12:17 PM, Mike Snitzer wrote:
> >On Mon, Mar 14 2011 at 12:47pm -0400,
> >Ron Johnson<ron.l.johnson@cox.net> wrote:
> >
> >>Hi,
> >>
> >>Is there any concern with mixing 4KB-sector drives with 512-byte
> >>sector drives in the same LV?
> >
> >Both LVM2 and Device Mapper have been updated to accommodate stacking
> >such a mix of drives.
> >
> >See this for a bit more detail:
> >http://people.redhat.com/msnitzer/docs/io-limits.txt
> >
> >Particularly, the "Stacking I/O Limits" section.
> >
> >The concern raised for partial (4k) writes to the 512b drive was
> >discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
> >
>
> Does this mean that util-linux v2.17.1 fdisk correctly handle AF
> disks? (Note that I will *not* be booting off an AF device.)
>
> ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.17/v2.17.1-ReleaseNotes
>
> fdisk:
> - cleanup alignment, default to 1MiB offset [Karel Zak]
> - don't check alignment_offset against geometry [Karel Zak]
> - fallback for topology values [Karel Zak]
> - fix ALIGN_UP [Karel Zak]
> - fix check_alignment() [Karel Zak]
> - fix default first sector [Karel Zak]
> - use "optimal I/O size" in warnings [Karel Zak]
> - use 1MiB offset and grain always when possible [Karel Zak]
> - use more elegant way to count and check alignment [Karel Zak]
> - use optimal_io_size [Karel Zak]
Given that changelog, yes.
(cc'ing kzak for the authoritative answer ;)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 19:13 ` Ron Johnson
2011-03-14 20:00 ` Mike Snitzer
@ 2011-03-15 0:15 ` John Drescher
1 sibling, 0 replies; 22+ messages in thread
From: John Drescher @ 2011-03-15 0:15 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Ron Johnson
On Mon, Mar 14, 2011 at 3:13 PM, Ron Johnson <ron.l.johnson@cox.net> wrote:
> On 03/14/2011 12:17 PM, Mike Snitzer wrote:
>>
>> On Mon, Mar 14 2011 at 12:47pm -0400,
>> Ron Johnson<ron.l.johnson@cox.net> �wrote:
>>
>>> Hi,
>>>
>>> Is there any concern with mixing 4KB-sector drives with 512-byte
>>> sector drives in the same LV?
>>
>> Both LVM2 and Device Mapper have been updated to accommodate stacking
>> such a mix of drives.
>>
>> See this for a bit more detail:
>> http://people.redhat.com/msnitzer/docs/io-limits.txt
>>
>> Particularly, the "Stacking I/O Limits" section.
>>
>> The concern raised for partial (4k) writes to the 512b drive was
>> discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
>>
>
> Does this mean that util-linux v2.17.1 fdisk correctly handle AF disks?
> �(Note that I will *not* be booting off an AF device.)
>
> ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.17/v2.17.1-ReleaseNotes
>
> fdisk:
> � - cleanup alignment, default to 1MiB offset �[Karel Zak]
> � - don't check alignment_offset against geometry �[Karel Zak]
> � - fallback for topology values �[Karel Zak]
> � - fix ALIGN_UP �[Karel Zak]
> � - fix check_alignment() �[Karel Zak]
> � - fix default first sector �[Karel Zak]
> � - use "optimal I/O size" in warnings �[Karel Zak]
> � - use 1MiB offset and grain always when possible �[Karel Zak]
> � - use more elegant way to count and check alignment �[Karel Zak]
> � - use optimal_io_size �[Karel Zak]
>
> --
> I prefer banana-flavored energy bars made from tofu.
fdisk now aligns partitions to sector 2048. I know this since it has
done that on the last few I formatted.
John
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 20:00 ` Mike Snitzer
@ 2011-03-15 8:02 ` Karel Zak
2011-03-15 14:24 ` Stuart D. Gathman
0 siblings, 1 reply; 22+ messages in thread
From: Karel Zak @ 2011-03-15 8:02 UTC (permalink / raw)
To: Mike Snitzer; +Cc: LVM general discussion and development
On Mon, Mar 14, 2011 at 04:00:57PM -0400, Mike Snitzer wrote:
> On Mon, Mar 14 2011 at 3:13pm -0400,
> Ron Johnson <ron.l.johnson@cox.net> wrote:
>
> > On 03/14/2011 12:17 PM, Mike Snitzer wrote:
> > >On Mon, Mar 14 2011 at 12:47pm -0400,
> > >Ron Johnson<ron.l.johnson@cox.net> wrote:
> > >
> > >>Hi,
> > >>
> > >>Is there any concern with mixing 4KB-sector drives with 512-byte
> > >>sector drives in the same LV?
> > >
> > >Both LVM2 and Device Mapper have been updated to accommodate stacking
> > >such a mix of drives.
> > >
> > >See this for a bit more detail:
> > >http://people.redhat.com/msnitzer/docs/io-limits.txt
> > >
> > >Particularly, the "Stacking I/O Limits" section.
> > >
> > >The concern raised for partial (4k) writes to the 512b drive was
> > >discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
> > >
> >
> > Does this mean that util-linux v2.17.1 fdisk correctly handle AF
> > disks? (Note that I will *not* be booting off an AF device.)
ideally util-linux >= 2.17.2 (e.g. RHEL6)
> >
> > ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.17/v2.17.1-ReleaseNotes
> >
> > fdisk:
> > - cleanup alignment, default to 1MiB offset [Karel Zak]
> > - don't check alignment_offset against geometry [Karel Zak]
> > - fallback for topology values [Karel Zak]
> > - fix ALIGN_UP [Karel Zak]
> > - fix check_alignment() [Karel Zak]
> > - fix default first sector [Karel Zak]
> > - use "optimal I/O size" in warnings [Karel Zak]
> > - use 1MiB offset and grain always when possible [Karel Zak]
> > - use more elegant way to count and check alignment [Karel Zak]
> > - use optimal_io_size [Karel Zak]
>
> Given that changelog, yes.
Yes, it works. Note that you have to disable (-c -u) DOS compatible
mode. The mode is disabled by default in Fedora, but enabled in RHEL6.
Some hints:
http://karelzak.blogspot.com/2010/05/4096-byte-sector-hard-drives.html
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-15 8:02 ` Karel Zak
@ 2011-03-15 14:24 ` Stuart D. Gathman
2011-03-15 17:36 ` Stuart D. Gathman
0 siblings, 1 reply; 22+ messages in thread
From: Stuart D. Gathman @ 2011-03-15 14:24 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Mike Snitzer
On Tue, 15 Mar 2011, Karel Zak wrote:
> Some hints:
> http://karelzak.blogspot.com/2010/05/4096-byte-sector-hard-drives.html
I remember working with 256 byte sector hard drives the size of
a mini refrigerator. 512 byte sectors were "advanced format".
--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-15 14:24 ` Stuart D. Gathman
@ 2011-03-15 17:36 ` Stuart D. Gathman
0 siblings, 0 replies; 22+ messages in thread
From: Stuart D. Gathman @ 2011-03-15 17:36 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Mike Snitzer
On Tue, 15 Mar 2011, Stuart D. Gathman wrote:
> On Tue, 15 Mar 2011, Karel Zak wrote:
>
>> Some hints:
>> http://karelzak.blogspot.com/2010/05/4096-byte-sector-hard-drives.html
>
> I remember working with 256 byte sector hard drives the size of a mini
> refrigerator. 512 byte sectors were "advanced format".
More future oriented: I read about high density storage just around the
corner that uses much larger sectors, typically 128K or 256K. These
are things like holographic memory. The researchers complain that
existing filesystems can't handle the large sector size efficiently. (Don't
know what filesystems they tried.) I note the similarity between
those sector sizes and flash erase blocks.
--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-14 17:17 ` Mike Snitzer
2011-03-14 17:32 ` Les Mikesell
2011-03-14 19:13 ` Ron Johnson
@ 2011-03-16 20:45 ` Phillip Susi
2011-03-16 22:55 ` Mike Snitzer
2 siblings, 1 reply; 22+ messages in thread
From: Phillip Susi @ 2011-03-16 20:45 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Ron Johnson, Mike Snitzer
On 3/14/2011 1:17 PM, Mike Snitzer wrote:
> Both LVM2 and Device Mapper have been updated to accommodate stacking
> such a mix of drives.
>
> See this for a bit more detail:
> http://people.redhat.com/msnitzer/docs/io-limits.txt
>
> Particularly, the "Stacking I/O Limits" section.
>
> The concern raised for partial (4k) writes to the 512b drive was
> discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
Unfortunately this does not help with the WD EARS model drives ( are
there any other 4kb sector drives on the market now? ), since they lie
and report that they have 512 byte sectors.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-16 20:45 ` Phillip Susi
@ 2011-03-16 22:55 ` Mike Snitzer
2011-03-16 23:11 ` Les Mikesell
2011-03-17 0:12 ` Phillip Susi
0 siblings, 2 replies; 22+ messages in thread
From: Mike Snitzer @ 2011-03-16 22:55 UTC (permalink / raw)
To: Phillip Susi; +Cc: Ron Johnson, LVM general discussion and development
On Wed, Mar 16 2011 at 4:45pm -0400,
Phillip Susi <psusi@cfl.rr.com> wrote:
> On 3/14/2011 1:17 PM, Mike Snitzer wrote:
> > Both LVM2 and Device Mapper have been updated to accommodate stacking
> > such a mix of drives.
> >
> > See this for a bit more detail:
> > http://people.redhat.com/msnitzer/docs/io-limits.txt
> >
> > Particularly, the "Stacking I/O Limits" section.
> >
> > The concern raised for partial (4k) writes to the 512b drive was
> > discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
>
> Unfortunately this does not help with the WD EARS model drives ( are
> there any other 4kb sector drives on the market now? ), since they lie
> and report that they have 512 byte sectors.
I'm not following what you're saying. The kernel's blk_stack_limits()
infrastructure accounts for "desktop" class 4K devices too (4K physical,
512b logical) -- as does DM and lvm2.
If given:
"desktop" class drive:
physical_block_size=4096
logical_block_size=512
minimum_io_size=4096
optimal_io_size=0
conventional 512 drive:
physical_block_size=512
logical_block_size=512
minimum_io_size=512
optimal_io_size=0
Stacking these drives would result in a logical device that has:
physical_block_size=4096
logical_block_size=512
minimum_io_size=4096
optimal_io_size=0
And yes, there are native 4K "enterprise" class drives (4K physical, 4K
logical) in the market.
Mike
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-16 22:55 ` Mike Snitzer
@ 2011-03-16 23:11 ` Les Mikesell
2011-03-17 0:02 ` Mike Snitzer
2011-03-17 0:12 ` Phillip Susi
1 sibling, 1 reply; 22+ messages in thread
From: Les Mikesell @ 2011-03-16 23:11 UTC (permalink / raw)
To: linux-lvm
On 3/16/2011 5:55 PM, Mike Snitzer wrote:
>
>> On 3/14/2011 1:17 PM, Mike Snitzer wrote:
>>> Both LVM2 and Device Mapper have been updated to accommodate stacking
>>> such a mix of drives.
>>>
>>> See this for a bit more detail:
>>> http://people.redhat.com/msnitzer/docs/io-limits.txt
>>>
>>> Particularly, the "Stacking I/O Limits" section.
>>>
>>> The concern raised for partial (4k) writes to the 512b drive was
>>> discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
>>
>> Unfortunately this does not help with the WD EARS model drives ( are
>> there any other 4kb sector drives on the market now? ), since they lie
>> and report that they have 512 byte sectors.
>
> I'm not following what you're saying. The kernel's blk_stack_limits()
> infrastructure accounts for "desktop" class 4K devices too (4K physical,
> 512b logical) -- as does DM and lvm2.
>
> If given:
>
> "desktop" class drive:
> physical_block_size=4096
> logical_block_size=512
> minimum_io_size=4096
> optimal_io_size=0
How does the kernel know about the physical_block_size when the device
reports itself as 512? And they handle 512 byte writes, just very slowly.
--
Les Mikesell
lesmikesell@gmail.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-16 23:11 ` Les Mikesell
@ 2011-03-17 0:02 ` Mike Snitzer
2011-03-17 0:18 ` Mike Snitzer
0 siblings, 1 reply; 22+ messages in thread
From: Mike Snitzer @ 2011-03-17 0:02 UTC (permalink / raw)
To: Les Mikesell; +Cc: linux-lvm
On Wed, Mar 16 2011 at 7:11pm -0400,
Les Mikesell <lesmikesell@gmail.com> wrote:
> On 3/16/2011 5:55 PM, Mike Snitzer wrote:
> >
> >>On 3/14/2011 1:17 PM, Mike Snitzer wrote:
> >>>Both LVM2 and Device Mapper have been updated to accommodate stacking
> >>>such a mix of drives.
> >>>
> >>>See this for a bit more detail:
> >>>http://people.redhat.com/msnitzer/docs/io-limits.txt
> >>>
> >>>Particularly, the "Stacking I/O Limits" section.
> >>>
> >>>The concern raised for partial (4k) writes to the 512b drive was
> >>>discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
> >>
> >>Unfortunately this does not help with the WD EARS model drives ( are
> >>there any other 4kb sector drives on the market now? ), since they lie
> >>and report that they have 512 byte sectors.
> >
> >I'm not following what you're saying. The kernel's blk_stack_limits()
> >infrastructure accounts for "desktop" class 4K devices too (4K physical,
> >512b logical) -- as does DM and lvm2.
> >
> >If given:
> >
> >"desktop" class drive:
> >physical_block_size=4096
> >logical_block_size=512
> >minimum_io_size=4096
> >optimal_io_size=0
>
> How does the kernel know about the physical_block_size when the
> device reports itself as 512? And they handle 512 byte writes, just
> very slowly.
The drive exports the information as part of its response to the
IDENTIFY DEVICE (for ATA) or READ CAPACITY (for SCSI) command -- it
splits out the physical and logical block sizes along with other
attributes. The kernel's SCSI (and libata) layer issues these commands
to the drive.
Much more detail available in Martin's paper:
http://oss.oracle.com/~mkp/docs/linux-advanced-storage.pdf
Mike
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-16 22:55 ` Mike Snitzer
2011-03-16 23:11 ` Les Mikesell
@ 2011-03-17 0:12 ` Phillip Susi
2011-03-17 0:39 ` Martin K. Petersen
1 sibling, 1 reply; 22+ messages in thread
From: Phillip Susi @ 2011-03-17 0:12 UTC (permalink / raw)
To: Mike Snitzer; +Cc: Ron Johnson, LVM general discussion and development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/16/2011 06:55 PM, Mike Snitzer wrote:
> I'm not following what you're saying. The kernel's blk_stack_limits()
> infrastructure accounts for "desktop" class 4K devices too (4K physical,
> 512b logical) -- as does DM and lvm2.
The kernel has the ability to read it from the drive and report it to
the user space tools, which have been patched to use it, but the WD EARS
drives lie and claim 512/512 instead of 512/4096.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk2BUewACgkQJ4UciIs+XuJ9ZwCeKxZGCQ7X3lJjgWrfuK/UVsaX
AO8An1nAO9p9wBvy6CxEgGHIXo2vemUc
=YQ0W
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-17 0:02 ` Mike Snitzer
@ 2011-03-17 0:18 ` Mike Snitzer
0 siblings, 0 replies; 22+ messages in thread
From: Mike Snitzer @ 2011-03-17 0:18 UTC (permalink / raw)
To: Les Mikesell; +Cc: linux-lvm
On Wed, Mar 16 2011 at 8:02pm -0400,
Mike Snitzer <snitzer@redhat.com> wrote:
> On Wed, Mar 16 2011 at 7:11pm -0400,
> Les Mikesell <lesmikesell@gmail.com> wrote:
>
> > On 3/16/2011 5:55 PM, Mike Snitzer wrote:
> > >
> > >>On 3/14/2011 1:17 PM, Mike Snitzer wrote:
> > >>>Both LVM2 and Device Mapper have been updated to accommodate stacking
> > >>>such a mix of drives.
> > >>>
> > >>>See this for a bit more detail:
> > >>>http://people.redhat.com/msnitzer/docs/io-limits.txt
> > >>>
> > >>>Particularly, the "Stacking I/O Limits" section.
> > >>>
> > >>>The concern raised for partial (4k) writes to the 512b drive was
> > >>>discussed a bit more here: http://lkml.org/lkml/2010/2/22/295
> > >>
> > >>Unfortunately this does not help with the WD EARS model drives ( are
> > >>there any other 4kb sector drives on the market now? ), since they lie
> > >>and report that they have 512 byte sectors.
> > >
> > >I'm not following what you're saying. The kernel's blk_stack_limits()
> > >infrastructure accounts for "desktop" class 4K devices too (4K physical,
> > >512b logical) -- as does DM and lvm2.
> > >
> > >If given:
> > >
> > >"desktop" class drive:
> > >physical_block_size=4096
> > >logical_block_size=512
> > >minimum_io_size=4096
> > >optimal_io_size=0
> >
> > How does the kernel know about the physical_block_size when the
> > device reports itself as 512? And they handle 512 byte writes, just
> > very slowly.
>
> The drive exports the information as part of its response to the
> IDENTIFY DEVICE (for ATA) or READ CAPACITY (for SCSI) command -- it
> splits out the physical and logical block sizes along with other
> attributes. The kernel's SCSI (and libata) layer issues these commands
> to the drive.
I just got Phillips' mail that the drive lies and reports 512/512.
(and I read your mail too quickly).
So yeah, the WD EARS drives are scary. Best for WD to defend or explain
them.
Mike
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-17 0:12 ` Phillip Susi
@ 2011-03-17 0:39 ` Martin K. Petersen
2011-03-17 14:21 ` hansbkk
2011-03-17 23:47 ` Ron Johnson
0 siblings, 2 replies; 22+ messages in thread
From: Martin K. Petersen @ 2011-03-17 0:39 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Ron Johnson, Mike Snitzer
>>>>> "Phillip" == Phillip Susi <psusi@cfl.rr.com> writes:
Phillip> The kernel has the ability to read it from the drive and report
Phillip> it to the user space tools, which have been patched to use it,
Phillip> but the WD EARS drives lie and claim 512/512 instead of
Phillip> 512/4096.
The saving grace is that modern util-linux/dm tooling aligns on 1MB by
default instead of sector 63.
And yes, there are Advanced Format drives shipping from both Hitachi and
Seagate...
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-17 0:39 ` Martin K. Petersen
@ 2011-03-17 14:21 ` hansbkk
2011-03-17 23:47 ` Ron Johnson
1 sibling, 0 replies; 22+ messages in thread
From: hansbkk @ 2011-03-17 14:21 UTC (permalink / raw)
To: LVM general discussion and development
Cc: Ron Johnson, Mike Snitzer, Martin K. Petersen
On Thu, Mar 17, 2011 at 7:39 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
> And yes, there are Advanced Format drives shipping from both Hitachi and
> Seagate...
And Samsung
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-17 0:39 ` Martin K. Petersen
2011-03-17 14:21 ` hansbkk
@ 2011-03-17 23:47 ` Ron Johnson
2011-03-22 10:23 ` Karel Zak
1 sibling, 1 reply; 22+ messages in thread
From: Ron Johnson @ 2011-03-17 23:47 UTC (permalink / raw)
To: linux-lvm
On 03/16/2011 07:39 PM, Martin K. Petersen wrote:
>>>>>> "Phillip" == Phillip Susi<psusi@cfl.rr.com> writes:
>
> Phillip> The kernel has the ability to read it from the drive and report
> Phillip> it to the user space tools, which have been patched to use it,
> Phillip> but the WD EARS drives lie and claim 512/512 instead of
> Phillip> 512/4096.
>
> The saving grace is that modern util-linux/dm tooling aligns on 1MB by
> default instead of sector 63.
>
So, given the correct options ( -c -b 4096 ), v2.17.2 will handle
the 2TB WD Caviar Green WD20EARS drives which I just bought for my
external backup device... Right?
(Along with a current lvm and kernel.)
https://www.redhat.com/archives/linux-lvm/2011-March/msg00053.html
--
I prefer banana-flavored energy bars made from tofu.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-17 23:47 ` Ron Johnson
@ 2011-03-22 10:23 ` Karel Zak
2011-03-22 16:51 ` Les Mikesell
0 siblings, 1 reply; 22+ messages in thread
From: Karel Zak @ 2011-03-22 10:23 UTC (permalink / raw)
To: LVM general discussion and development
On Thu, Mar 17, 2011 at 06:47:18PM -0500, Ron Johnson wrote:
> On 03/16/2011 07:39 PM, Martin K. Petersen wrote:
>>>>>>> "Phillip" == Phillip Susi<psusi@cfl.rr.com> writes:
>>
>> Phillip> The kernel has the ability to read it from the drive and report
>> Phillip> it to the user space tools, which have been patched to use it,
>> Phillip> but the WD EARS drives lie and claim 512/512 instead of
>> Phillip> 512/4096.
>>
>> The saving grace is that modern util-linux/dm tooling aligns on 1MB by
>> default instead of sector 63.
>>
>
> So, given the correct options ( -c -b 4096 ), v2.17.2 will handle the 2TB
> WD Caviar Green WD20EARS drives which I just bought for my external
> backup device... Right?
The -b option is usually unnecessary (for v2.17 is the -c enough).
It seems (according to feedback from users) that newer WDxxEARS disks
are already fixed.
http://community.wdc.com/t5/Desktop/Problem-with-WD-Advanced-Format-drive-in-LINUX-WD15EARS/m-p/20675#M1245
Try
hdparm -I /dev/<disk>
to see more details, for example:
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
and
# cat /sys/block/<disk>/queue/physical_block_size
4096
It's also better to update to util-linux v2.18 or v2.19 where all the
new features are enabled by default (so -c is unnecessary too).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [linux-lvm] Advanced Format disks mixed with regular disks?
2011-03-22 10:23 ` Karel Zak
@ 2011-03-22 16:51 ` Les Mikesell
0 siblings, 0 replies; 22+ messages in thread
From: Les Mikesell @ 2011-03-22 16:51 UTC (permalink / raw)
To: linux-lvm
On 3/22/2011 5:23 AM, Karel Zak wrote:
>
> It seems (according to feedback from users) that newer WDxxEARS disks
> are already fixed.
> http://community.wdc.com/t5/Desktop/Problem-with-WD-Advanced-Format-drive-in-LINUX-WD15EARS/m-p/20675#M1245
>
>
> Try
>
> hdparm -I /dev/<disk>
>
> to see more details, for example:
>
> Logical Sector size: 512 bytes
> Physical Sector size: 4096 bytes
>
> and
>
> # cat /sys/block/<disk>/queue/physical_block_size
> 4096
This isn't exactly an LVM issue (but I suppose it could be, and at least
some people understand the problem here...). I'd like to do RAID1 with
a WD 'Scorpio' laptop-size 750 gig drive which has 4k sectors but
reports 512 as both the physical and logical size as one member with a
full size Seagate with a matching number of sectors as the other. And
I'd like to periodically swap the small drive, rotate offsite, and
resync a different one. As things stand, it would take days for this
sync to complete so I've been using full size drives for both instances.
Is there some hope of getting the sync time down to 8 hours or so?
And is that going to involve both updating to a fairly recent Linux
distro (it's Centos 5.x now) and starting from scratch with new
partition alignment?
For full disclosure, this is a backuppc archive with a bizallion
hardlinks that would take many days to copy with a file-oriented
approach and it's really a 3-member raid1 where 2 drives are always
present and one swapped in long enough to resync. But those things
shouldn't matter except for the difficulty in changing the partition
alignment. The existing one runs to the end of the disk so I can't
offset the start and still match up in size.
--
Les Mikesell
lesmikesell@gmail.com
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2011-03-22 16:51 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 16:47 [linux-lvm] Advanced Format disks mixed with regular disks? Ron Johnson
2011-03-14 17:17 ` Mike Snitzer
2011-03-14 17:32 ` Les Mikesell
2011-03-14 18:02 ` Mike Snitzer
2011-03-14 18:09 ` Ron Johnson
2011-03-14 19:13 ` Ron Johnson
2011-03-14 20:00 ` Mike Snitzer
2011-03-15 8:02 ` Karel Zak
2011-03-15 14:24 ` Stuart D. Gathman
2011-03-15 17:36 ` Stuart D. Gathman
2011-03-15 0:15 ` John Drescher
2011-03-16 20:45 ` Phillip Susi
2011-03-16 22:55 ` Mike Snitzer
2011-03-16 23:11 ` Les Mikesell
2011-03-17 0:02 ` Mike Snitzer
2011-03-17 0:18 ` Mike Snitzer
2011-03-17 0:12 ` Phillip Susi
2011-03-17 0:39 ` Martin K. Petersen
2011-03-17 14:21 ` hansbkk
2011-03-17 23:47 ` Ron Johnson
2011-03-22 10:23 ` Karel Zak
2011-03-22 16:51 ` Les Mikesell
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).