Istvan Gabor wrote:
2012. május 5. 17:51 napon Jan Ritzerfeld
írta: Am Mittwoch, 2. Mai 2012, 13:29:03 schrieb Istvan Gabor:
My dmraid array occasionally runs only with one hard disk, since one of the disks is not recognized at boot. For this reason I would like the OS to check the existence of both of the hard disks during bootup and if it can't find one of them it should not finsih booting but restart the computer, before mounting the RAID array. I thought that a small script could go somewhere in /etc/init.d but I don't know where and how to name it or activate it.
How could I do it? [...] However, I see /etc/init.d/boot.dmraid that seems to setup your dmraid. [...]
I know dmraid command (dmraid -s, -r, -b). I think you might be right that it isn't a good idea to reboot from a running boot process. It would be better to check the devices' availability before the boot starts, e.g. in the grub state. I look after whether it is possible.
This mail has been some time ago, so I don't know if you made advances... /etc/init.d (e.g., sysvinit or systemd) is too late, at this time dmraid array is already assembled. You have to do the check in initrd. And there you can reboot without problems, as disk state isn't changed too much. To change your initrd, you have to use mkinitrd. man 8 mkinitrd and man 5 mkinitrd should get you started. A VM instance to try this out, for quick booting and snapshots if something went wrong, is probably the best development environment for such a feature. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jschrod@acm.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org