Gentoo Archives: gentoo-user

From: "Boyd Stephen Smith Jr." <bss03@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] raid/partition question
Date: Mon, 20 Feb 2006 18:18:49
Message-Id: 200602201204.29346.bss03@volumehost.com
In Reply to: [gentoo-user] raid/partition question by Nick Smith
1 On Monday 20 February 2006 09:57, "Nick Smith" <nick.smith79@×××××.com>
2 wrote about '[gentoo-user] raid/partition question':
3 > just wanted to ask before i mess something up.
4 > i have booted off the install cd, created a raidtab with my mirrored
5 > drives on it. i have created the raid. now, do i go in and setup the
6 > partitions i want on that raid? or should i have done that before
7 > creating the raid? so instead of having one big mirror and then
8 > partitioning that, do i need to create my seperate partitions and then
9 > mark them as "fd" and then create each raid seperate?
10
11 I would suggest partitioning the drives identically, then using mdadm to
12 create your raid devices. The reason I say this is because the kernel
13 does not seem to have any room in the device node space for partitions on
14 an md device.
15
16 I could be wrong here; but I know partition and then build will work.
17
18 If you'll look at the major/minor number of IDE devices, you'll see that
19 hda and hdb have the same major, but the minor number on hdb is +64...
20 thus this allows 63 recognized partitions / disk labels on an IDE device.
21 (hda1 is +1 minor from hda, hda2 is +2, etc.; similarly for hdb)
22
23 If you do the same investigation on SCSI/SATA devices, you'll see that sda
24 and sdb have the same major number, but the minor number on sdb is +16...
25 thus only 15 partitions / disk labels are recognized on a SCSI/SATA
26 device. I do believe we recently had a member of gentoo-user run into
27 this problem. (Switching to not using partitions as much will help; I
28 prefer LVM LVs myself.)
29
30 Finally, you can look at the software raid devices, you'll see that md0 and
31 md1 have the same major number (9) and the minor number on md1 (1) is only
32 +1 from the minor number on md0 (0). Due do this, I fear that the kernel
33 may not properly recognize partitions / disk labels on software raid
34 devices.
35
36 It's entirely possible that partitions on software raid devices use a
37 different major number and/or use dynamic minor numbers so partitioning
38 the raid device may work -- I just can't recommend it because I don't know
39 it'll work and I know partitioning first, then raid-ing the partitions
40 does work.
41
42 As the other poster said, be careful with how you treat your bootable
43 partition. It must be a partition recognized by your bootloader, on a
44 disk recognized by the BIOS / EMI, using a filesystem understood by your
45 bootloader. If you use the old-style software raid (no superblock; by
46 default mdadm does create a superblock), you can use raid 1 for boot, but
47 each component partition should satisfy all the conditions for a bootable
48 partition.
49
50 --
51 Boyd Stephen Smith Jr.
52 bss03@××××××××××.com
53 ICQ: 514984 YM/AIM: DaTwinkDaddy
54 --
55 gentoo-user@g.o mailing list