Drive mount issue after power outage

  • Hi All. Not sure if this has been asked before i cant really find anything that matches my query.

    So we have these wonderful scheduled power outages here is sunny South Africa know as loadshedding.

    When a power outage occurs and we are up and running again my Libreelec Hp Proliant micro server looses a drive. Consistently it will be either my 4tb or my 6tb that does not mount. even after numerous reboot the drive refuses to mount.

    My fix is to boot gpart, (drive always shows here, no flags), run a check disk then boot back to libreelec.

    This always fixes the drive. Does LE check the drives before mounting?

    IS there a way for me to force a check before mounting?

  • udev rules are cummulative so you can add a rule to /storage/.config/udev.rules.d/ that matches on label/uuid and runs fsck on the drive. This will then be a persistent behaviour that is done on each boot.

    I'm not sure what the match criterial look like in a rule so you'll need to Google a bit, but the following commit shows a similar rule that matches on HFS+ filesystems and fsck's them so the rest of the rule will look similar:

    LibreELEC.tv/62-fsck-hfsplus.rules at df49fbc2926df71a3fa799f961385671373b631b · LibreELEC/LibreELEC.tv · GitHub