Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far
Date: Tue, 09 Feb 2010 18:20:32
Message-Id: 9C06FE85-D96B-4CF3-9E43-57DA1EB5B32B@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far by "J. Roeleveld"
1 On 9 Feb 2010, at 15:27, J. Roeleveld wrote:
2
3 > On Tuesday 09 February 2010 16:11:14 Stroller wrote:
4 >> On 9 Feb 2010, at 13:57, J. Roeleveld wrote:
5 >>> ...
6 >>> With Raid (NOT striping) you can remove one disk, leaving the Raid-
7 >>> array in a
8 >>> reduced state. Then repartition the disk you removed, repartition
9 >>> and then re-
10 >>> add the disk to the array.
11 >>
12 >> Exactly. Except the partitions extend, in the same positions, across
13 >> all the disks.
14 >>
15 >> You cannot remove one disk from the array and repartition it, because
16 >> the partition is across the array, not the disk. The single disk,
17 >> removed from a RAID 5 (specified by Paul Hartman) array does not
18 >> contain any partitions, just one stripe of them.
19 >>
20 >> I apologise if I'm misunderstanding something here, or if your RAID
21 >> works differently to mine.
22 >
23 > Stroller, it is my understanding that you use hardware raid adapters?
24
25 Yes.
26
27 > If that is the case, then the mentioned method won't work for you ...
28 >
29 > I believe Paul Hartman is, like me, using Linux Sofware raid (mdadm
30 > +kernel
31 > drivers).
32 >
33 > In that case, you can do either of the following:
34 > Put the whole disk into the RAID, eg:
35 > mdadm --create --level=5 --devices=6 /dev/sd[abcdef]
36 > Or, you create 1 or more partitions on the disk and use these, eg:
37 > mdadm --create --level=5 --devices=6 /dev/sd[abcdef]1
38
39 Thank you for identifying the source of this misunderstanding.
40
41 > and if your raid-adapters already align everything properly, then
42 > you shouldn't notice any problems with these drives.
43 > It would, however, be interesting to know how hardware raid adapters
44 > handle these 4KB sector-sizes.
45
46 I think my adaptor at least, being older, may very well be prone to
47 this problem. I discussed this in my post of 8 February 2010 19:57:46
48 GMT - certainly I have a RAID array aligned beginning at sector 63,
49 and it is at least a little slow. I will test just as soon as I can
50 afford 3 x 1TB drives.
51
52 I think the RAID adaptor would have to be quite "clever" to avoid this
53 problem. It may be a feature added in newer controllers, but that
54 would be a special attempt to compensate. I think in the general case
55 the RAID controller should just consolidate 3 x physical block devices
56 (or more) into 1 x virtual block device, and should not do anything
57 more complicated that this. I am sure that a misalignment will
58 propagate downwards through the levels of obscusification.
59
60 IMO this is a fdisk "bug". A feature should be added so that it tries
61 to align optimally in most circumstances. RAID controllers should not
62 be trying to do anything clever to accommodate potential misalignment
63 unless it is really cheap to do so.
64
65 Stroller.

Replies

Subject Author
Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far Mark Knecht <markknecht@×××××.com>