LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Software raid1 with modules (long!) (https://www.linuxquestions.org/questions/linux-general-1/software-raid1-with-modules-long-206760/)

robbow52 07-18-2004 09:19 PM

Software raid1 with modules (long!)
 
I've been trying to setup my system with software raid1 using the "missing disk" method and I've run into problems. I've read all the howto's that I could find and I "should" be able to accomplish this, but I'm stuck right now...

First of all, I did a base install of Sid from a daily image which went fairly well. My hopes are to have a system where I can simply do an "apt-get install kernel-image-something" to upgrade my system. After installing the base system, I installed a few packages with apt to get things set up and then I immediately did an "apt-get install kernel-image-2.6.7-1-k7-smp" (to replace my base install 2.6.6-1-386 kernel) which went without errors, I checked to be sure lilo.conf had been setup correctly and rebooted and everything was fine. I then modified my /etc/modules and my /etc/mkinitrd/modules to include the following:

sd_mod
sr_mod
scsi_mod
md
raid0
raid1
raid5
ext3

I then created a new initrd.img with mkinitrd, ran lilo and rebooted. Here is the relevant portion of dmesg:

RAMDISK: cramfs filesystem found at block 0
RAMDISK: Loading 4588 blocks [1 disk] into ram disk...
VFS: Mounted root (cramfs filesystem) readonly.
Freeing unused kernel memory: 168k freed
SCSI subsystem initialized
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
raid5: measuring checksumming speed
8regs : 2076.000 MB/sec
8regs_prefetch: 2132.000 MB/sec
32regs : 1616.000 MB/sec
32regs_prefetch: 1464.000 MB/sec
pIII_sse : 4164.000 MB/sec
pII_mmx : 4152.000 MB/sec
p5_mmx : 5564.000 MB/sec
raid5: using function: pIII_sse (4164.000 MB/sec)
md: raid5 personality registered as nr 4

This is all loading "before" the drivers for my scsi adapters and everything appears to be "working". "uname -r" shows I am running the new kernel and cat /proc/mdstat shows:

Personalities : [raid0] [raid1] [raid5]
unused devices: <none>

I then create my raid1 array:

mdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/sdb1
mdadm --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdb2
mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdb3

and so forth for all of my partitions. Everything goes fine (except for errors showing the the "device contains an ext2 fs... I've repartitioned and it still comes up that way). A cat /proc/mdstat shows the raid personalities AND the raid array with all of the devices.

I reboot and the array is gone!!! A cat /proc/mdstat shows:

Personalities : [raid0] [raid1] [raid5]
unused devices: <none>

What am I missing??? I've repartitioned the drive several times, I've made sure that the partitions are all set to "raid autodetect" or "fd" and fdisk -l shows everything is fine. I've run "mdadm --zero-superblock" on each of the block devices prior to "creating" the array...

Others have seemingly been able to setup software raid1 with modules rather than compiled into the kernel, but I've obviously missed something???

Thanks in advance for your input!


All times are GMT -5. The time now is 08:50 AM.