RAID autodetect fails - done before scsi detection (?)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
RAID autodetect fails - done before scsi detection (?)
Hi all,
my goal is a software RAID, level 1, on two identical SATA Disks.
With:
Quote:
mdadm -Cv /dev/md0 -n2 -l1 /dev/sda1 /dev/sda2
I can create and start the array. I can do mkfs, mount it, everything works fine until rebooting the system.
If done, the array does not run. mdadm --run /dev/md0 brings an error. I can rebuild the array with the command above - not very comfortable.
I guess, that the kernel first searches for an array, and after this, it scans for the SATA drives. Since the array should reside on the SATA drives, it cannot be started.
I post a dmesg snippet with line numbers, that shows the md autodetection before the scsi detection - if I see this correctly.
Does anyone can say me, if I am right or wrong, and, more important, what I can do to get the autodetection working?
Thanks a lot,
Clemens
P.S: All this happens on a debian sarge system, kernel 2.6.8 custom.
Quote:
160:md: linear personality registered as nr 1
161:md: raid0 personality registered as nr 2
162:md: raid1 personality registered as nr 3
163:md: raid5 personality registered as nr 4
164-raid5: automatically using best checksumming function: pIII_sse
165- pIII_sse : 4784.000 MB/sec
166-raid5: using function: pIII_sse (4784.000 MB/sec)
167:md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
168-device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com
I don't know software raid, but perhaps:
-raid is compiled as module so the module is loaded after some critical phase.
-you have to specify something to the boot loader.
Hope this helps.
I build a custom kernel with
- SCSI
- RAID support, all RAID flavors (1, 2, ...)
compiled direct into the kernel. Without, the autodetection did nothing in dmesg.
I thought about the boot loader, too. I use grub. But I can't think what parameter I should give to the kernel. Google did say nothing, too. At least to me ;-)
I don't really know, where to go. At the moment, I build another kernel with all ata stuff demodulized, build inti the kernel...
Finally I got it working.
If someone faces the same prob, perhaps he can use this:
The autodetection system still fails with autodetection :-(
As workaround, I use the /etc/init.d/mdadm-raid script.
I put a symlink into /etc/rcS.d. It was a little difficult to provide correct dependencies between the startup scripts, since the raid script must be run before the mountall script.
The mountall script uses the raid and mounts it into the filesystem. Better the array runs at this moment ;-)
But the raid script needs mountvirtfs and mountprocfs (or so) to be run before...
After two or three dozens of reboots, the system works, now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.