Bug 82513
Summary: | RFE: make rc.sysinit use mdadm in addition to raidstart | ||
---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | James Ralston <ralston> |
Component: | initscripts | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED RAWHIDE | QA Contact: | Brock Organ <borgan> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | phoebe | CC: | katzj, mitr, rvokal |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-03-18 08:27:24 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 79579 |
Description
James Ralston
2003-01-22 22:59:44 UTC
How often do you have not-autodetected raid arrays, out of curiousity? Hm, doing this right would also involve adding support to mkinitrd, etc., etc. Actually, I've *never* been able to get my arrays to automatically start on Psyche using mdadmin. That's why I filed this enhancement request for Phoebe. I have a Psyche system with 3 SCSI disks. The first disk is a (non-RAID) system disk: Disk /dev/sda: 255 heads, 63 sectors, 2213 cylinders Device Boot Start End Blocks Id System /dev/sda1 1 2213 17775891 5 Extended /dev/sda5 1 261 2096419+ 82 Linux swap /dev/sda6 * 262 1828 12586896 83 Linux I want to use the remaining two disks to make a /data partition: Disk /dev/sdb: 255 heads, 63 sectors, 4427 cylinders Disk /dev/sdc: 255 heads, 63 sectors, 4427 cylinders Device Boot Start End Blocks Id System /dev/sdb1 1 33 265041 fd Linux raid autodetect /dev/sdc1 1 33 265041 fd Linux raid autodetect So, I create a new mirror: $ mdadm --create /dev/md0 --verbose --level=mirror --raid-devices=2 /dev/sdb1 /dev/sdc1 I wait for the mirror to sync, and then check its status: $ cat /proc/mdstat Personalities : [raid1] read_ahead 1024 sectors md0 : active raid1 sdc1[1] sdb1[0] 264960 blocks [2/2] [UU] unused devices: <none> Then I update /etc/mdadm.conf: $ mdadm --examine --scan >>/etc/mdadm.conf And clean it up slightly: $ cat /etc/mdadm.conf DEVICE /dev/sdb[1234] DEVICE /dev/sdc[1234] ARRAY /dev/md0 level=raid1 num-devices=2 devices=/dev/sdb1,/dev/sdc1 UUID=d8aea89f:0261ca12:b9dec0d4:bd7752a3 Now, I reboot the machine. After the machine comes back up, I login and run: $ cat /etc/mdadm.conf Personalities : read_ahead not set unused devices: <none> I can manually modprobe the raid1 module, but it won't start the array: $ modprobe raid1 Personalities : [raid1] read_ahead not set unused devices: <none> The only way I can get the array to start up is to run mdadmin: $ mdadm --assemble --scan mdadm: /dev/md0 has been started with 2 drives. Was (autodetecting and autostarting arrays created via mdadmin at system boot time) already supposed to work in Psyche and/or Phoebe? What happens if you do: modprobe raid1 nash raidautorun /dev/md0 (in nash) ? Success--the "raidautorun /dev/md0" command in nash automatically starts the array. (I tested both with and without running modprobe first; AFAICT, the modprobe command is superfluous.) An update: I tested this some more under Phoebe (8.0.94), and it appears to do the right thing: the arrays are started up when the kernel performs autodetection. Unfortunately, it's not obvious that for autodetection to work, the initrd image has to contain the appropriate md modules (e.g. raid1). This will be the case if a user sets up md devices during installation, of course, but if no devices are created during the installation, and md devices are later created, mkinitrd must be re-run in order to update the initrd image with the appropriate md modules. Perhaps the "you'll need to re-run mkinitrd if you change your md configuration" requirement should be mentioned in the release notes? Since this appears to work, I'm closing with RESOLVED RAWHIDE. I still think the release notes should mention that mkinitrd needs to be re-run if any md devices are created/deleted after the system has already been installed. |