Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I am just having my server fail to boot after extending my Linux Software RAID from 3 hds to 4 hds.
It doubles as internet access gateway, router, fileserver, printserver, firewall (i.e EVERYTHING ;-)
The array extension (RAID5) went well, amazing enough (ask about, if you want to know more [this is a pretty new feature for RAID5 that was not possible 1 year ago])
I updated the mdadm.conf after extending and now the array looks like this:
/dev/hda1 /dev/hdc1 /dev/hde1 /dev/hdg1
(hda1 is new)
After rebooting the server the headache started: Failure to recognize and mount /dev/md0.
The initrd tells me that there is no array found for /dev/md0, although it does recognize and mount the one for /dev/md1, which is my swap space (that I did not modify).
I am stuck in busybox, in the initramdisk of debian etch.
I can activate the RAID 5 array by hand with
mdadm --assemble /dev/md0 /dev/hda1 /dev/hdc1 /dev/hde1 /dev/hdg1
and even mount it to a directory.
(so the problem is probably tiny and is not in the array itself)
But I could not really understand how to get PIVOT_ROOT to work to switch over to the new ROOT so I can at least get my system running again and restore functionality.
The man page eludes me (much to short) and when trying it always says device or resource busy ??? :-(
Now the most burning questions at this point:
1. How the heck can the initrd mount the raid array when it takes the configuration information from the mdadm.conf that IS on the array?
2. How does the initrd start? is there a script that is started at the very beginning when the initrd is active? If I can run that again after mounting the array by hand, I might be able to get the system working again and understand what is going wrong..
I am glad for any pointers or insights as always. I never much dealt with the initrd before and now more than ever don't see the need for this complication.
At the boot time, the system looks for partitions labeled AUTORAID, so be sure the new part. /dev/hda1 label is AUTORAID.
SO the mdadm.conf file is optional.
What I did not know was that in Debian Etch, the Software RAID config is stored in the initrd.
So when the system started up, it found an array with 4 disks, but the config file said that it was supposed to have 3. Bingo.
Changed the ramdisk and now the system is running again. You have to rebuild the initrd pretty every time you change something on the system.
Otherwise you might have a big suprise when you reboot. I am NOT a fan of initrds, since they complicate matters as can seen from my example.
So can RAID be started without any configuration file? How does it realize which arrays get assigned to which device (/dev/md0 /dev/md1 etc.) if you have several?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.