Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
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 16:05:20
Message-Id: 201002091627.32157.joost@antarean.org
In Reply to: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far by Stroller
1 On Tuesday 09 February 2010 16:11:14 Stroller wrote:
2 > On 9 Feb 2010, at 13:57, J. Roeleveld wrote:
3 > > ...
4 > > With Raid (NOT striping) you can remove one disk, leaving the Raid-
5 > > array in a
6 > > reduced state. Then repartition the disk you removed, repartition
7 > > and then re-
8 > > add the disk to the array.
9 >
10 > Exactly. Except the partitions extend, in the same positions, across
11 > all the disks.
12 >
13 > You cannot remove one disk from the array and repartition it, because
14 > the partition is across the array, not the disk. The single disk,
15 > removed from a RAID 5 (specified by Paul Hartman) array does not
16 > contain any partitions, just one stripe of them.
17 >
18 > I apologise if I'm misunderstanding something here, or if your RAID
19 > works differently to mine.
20 >
21 > Stroller.
22 >
23
24 Stroller, it is my understanding that you use hardware raid adapters?
25 If that is the case, then the mentioned method won't work for you and if your
26 raid-adapters already align everything properly, then you shouldn't notice any
27 problems with these drives.
28 It would, however, be interesting to know how hardware raid adapters handle
29 these 4KB sector-sizes.
30
31 I believe Paul Hartman is, like me, using Linux Sofware raid (mdadm+kernel
32 drivers).
33
34 In that case, you can do either of the following:
35 Put the whole disk into the RAID, eg:
36 mdadm --create --level=5 --devices=6 /dev/sd[abcdef]
37 Or, you create 1 or more partitions on the disk and use these, eg:
38 mdadm --create --level=5 --devices=6 /dev/sd[abcdef]1
39
40 To have linux auto-detect for raid devices work, as far as I know, the
41 partitioning method is required.
42 For that, I created a single full-disk partition on my drives:
43 --
44 # fdisk -l -u /dev/sda
45
46 Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
47 255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
48 Units = sectors of 1 * 512 = 512 bytes
49 Disk identifier: 0xda7d8d6d
50
51 Device Boot Start End Blocks Id System
52 /dev/sda1 64 2930277167 1465138552 fd Linux raid autodetect
53 --
54
55 I, after reading this, redid the array with the partition starting at sector
56 64. Paul was unfortunate to have already filled his disks before this thread
57 appeared.
58
59 The downside is: you loose one sector, but the advantage is a much improved
60 performance (Or more precisely, not incur the performance penalty from having
61 misaligned partitions)
62
63 --
64 Joost Roeleveld

Replies

Subject Author
Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far Stroller <stroller@××××××××××××××××××.uk>