External hard disk error halts boot process on headless Raspberry Pi

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • External hard disk error halts boot process on headless Raspberry Pi

      Short version: Errors on an external drive are causing my OMV Raspberry Pi to halt waiting for user interaction during the boot process, which is extremely inconvenient as it is a headless system. How can I tell it to skip badly behaving drives and still boot so I can fix the problem through SSH without physically pulling the box?

      Long version:
      I have OMV running on a headless Raspberry Pi that I manage using the web client and/or SSH. Recently after a power outage it failed to boot. When I finally went and grabbed it and plugged it into a monitor, the boot process is interrupted by a few EXT4-fs errors related to an external HD used by OMV:

      "inode bad entry in directory: rec_len is smaller than minimal"

      and then

      "Give root password for maintenance:"

      The errors turned out to be caused by files incorrectly marked as directories, and are easily fixable. What concerns me is that these non-fatal errors are causing my headless system to be totally unusable until I go physically yank it and plug it into a monitor and keyboard.

      I'm assuming this behavior is caused by the lines OMV added to fstab to make the external mount:

      Source Code

      1. # >>> [openmediavault]
      2. /dev/disk/by-label/ExternSSD /srv/dev-disk-by-label-ExternSSD ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
      3. /dev/disk/by-id/mmc-GA6QR_0x6acc6683-part3 /srv/dev-disk-by-id-mmc-GA6QR_0x6acc6683-part3 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,discard,acl 0 2
      4. # <<< [openmediavault]
      I thought "nofail" was supposed to prevent issues like this, but on closer inspection it appears to only prevent errors if the drive is totally unavailable. If the drive is available but has errors, they still stop the boot process.

      Is there anything I can do make sure that errors on an external drive don't stop the boot process? I'm fine with it skipping a badly behaving drive, as long as it still boots so I can get in through SSH. Obviously I don't want to lose the desired behavior of auto-mounting a correctly behaving drive at startup so OMV can use it.