2012. május 5. 17:51 napon Jan Ritzerfeld <suse@mailinglists.jan.ritzerfeld.org> í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?
Do you know how to check whether the dmraid array is okay? Do you already know how to parse the output of, e.g., "dmraid -s" or "dmraid -b"? Or is it as simple as just checking for the existence of, e.g., "/dev/sda"?
Since I do not run a dmraid, I cannot give you any (well) tested advice. I do not even know whether it is a good idea to automatically reboot from a an init script. You have been warned!
However, I see /etc/init.d/boot.dmraid that seems to setup your dmraid. You could add the appropriate check and just execute "reboot" if the check fails. If this works, you could write your own boot.dmraidcheck script based on boot.dmraid that runs after it, e.g., by specifying "Required-Start: boot.dmraid".
Hello: Thank you for your advice. 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. Thanks again, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org