I'm not sure when/why this started happening, but I have a RAID array entered in my /etc/fstab to mount on boot to /mnt/data. Up until today everything has been fine, and it's been that way for several years!

Anyway, I rebooted the server today (CentOS 7) and it went into "emergency mode". After checking journalctrl the following entries existed:

Feb 01 13:04:45 CentOS7 systemd[1]: Mounting /mnt/data...
Feb 01 13:04:45 CentOS7 mount[819]: mount: /dev/md126 is already mounted or /mnt/data busy
Feb 01 13:04:45 CentOS7 systemd[1]: Failed to mount /mnt/data.

However, if I remove the line from /etc/fstab and reboot (which starts normally), then re-enter the line, and run mount -a then it mounts OK.

Any reason why it's failing on boot?

I've added errors=continue as an option to the line in /etc/fstab which prevents a reboot entering emergency mode (and strangely mounts the drive anyway – presumably in a later step), but as there are other mounts I would like to perform on boot which depend on that one being mounted initially, so really I'd like to find a proper solution.

  • 1
    can you post the entire fstab file please
    – d4v3y0rk
    Sep 28 '17 at 17:07
  • Is it possible something mounts /mnt/data in a script, like rc.local, that runs after the fstab mount? That would show those errors in the journal and cause the system to not boot properly. Is /mnt/data empty and not being accessed? If something is trying to write to that area when the mount occurs, it will cause this error as well. Some process that starts on boot may have it's log file set to /mnt/data/log, for example. Just a few idea. Oct 2 '17 at 17:58
  • Could you please post your: cat /etc/fstab And with your line inside fstab, after a reboot. Please post the content of: dmesg
    – hrdy
    Oct 5 '17 at 14:08
  • Did you, by any chance, updated from Centos 6 to Centos 7? As Centos 7 is only around for a little over 2 years...
    – cptMikky
    Nov 4 '17 at 23:16

Without the fstab file I cannot say much, but if it fails to mount a disk it will go into emergency mode.
You can prevent this by adding the nofail option. This will cause the disk NOT to be mounted and continue booting anyway if an error occurs while mounting.

A common cause of this error is referencing a disk as /dev/sdX. If there are other disks connected it may cause to try to mount another disk, and could fail due to specific options.

I may be able to provide more details if you provide an fstab file.

  • nofail doesn't work on LVM partition for some reason. Presumably it's LVM halting the boot if it finds an error (even though the boot partition is fine).
    – Ken Sharp
    Aug 3 '18 at 12:04

There might by different reasons for that:

  • /etc/mtab still existing because no proper shutdown before?

  • /dev/md128 is indeed already mounted to a different directory?

  • something else is mounted to /mnt/data

Best way would be to let the system go up (e.g. by entering the root password, if asked) and check what happens. The output of the mount command would be helpful.

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.