4

I have a computer that I rarely have physical access to. All my access to that computer is done using SSH. On that computer, there's a software RAID5 using MDADM. This array contains data in one folder and this folder is mounted automatically through fstab.

The problem is that if any issue happens with the RAID array, Debian fails to boot. This is a big problem for me because I'll have to request physical access to the drive when this happens, which is not that simple. Some times there's no real faulty drives, but there's a problem with some partition table that can be easily fixed. At least I need to know that a problem that needs physical intervention exists before I request physical access.

How can I get the following result: If MDADM fails or some drive is faulty or any problem with RAID exists:

1- Boot normally or at least to the level where I have ssh access

2- Don't assemble the array

3- Of course, don't mount that folder

4- Give me some kind of warning after logging with SSH (this is less important, because I'll notice the existence of a problem when I don't see that drive mounted).

Can this be achieved? And if any alternative exists, please tell me.

Thanks.

1

I assume you are mounting in /etc/fstab. There is a nobootwait option, from man

to explicitly instruct mountall(8) not to hold up the boot for them

There is also a degraded boot option for mdadm, which I have never used and I think it is used if OS is installed on raid:

dpkg-reconfigure mdadm

and tell mdadm to allow degraded boot

IMO nobootwait option and not mounting a degraded array is a safer way

0

Updated Answer in 2020

nobootwait is a ubuntu distro option (I believe) and doesn't exist on Debian. At least not on Debian 10. I believe it is being retired from Ubuntu as well (?)

In my fstab I include the options

_netdev,auto,nofail,x-systemd.device-timeout=1000ms

so my fstab line looks like this

10.0.0.2:/mnt/md0   /mnt/md0    nfs4    _netdev,auto,nofail,x-systemd.device-timeout=1000ms 0   0

See also this question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.