I have a system with a lot of disks (roughly 96 data drives, formatted xfs) running Ubuntu 20.04 LTS. During boot, systemd manages to mount most of the drives, but fails to fully last 20 or so mounts listed in the /etc/fstab.
The system has multiple 24 bay SAS shelves chained together and I mount using /mnt/shelf/shelf#/disk#
referencing a device by label (eg: /dev/disk/by-label/disk-###
) in the fstab file. The fstab file is very long but all the data disk mount lines are the same, looking something like this:
*snip*
/dev/disk/by-label/disk-501 /mnt/shelf/5/501 xfs defaults 0 0
/dev/disk/by-label/disk-502 /mnt/shelf/5/502 xfs defaults 0 0
/dev/disk/by-label/disk-503 /mnt/shelf/5/503 xfs defaults 0 0
*snip*
Strangely, it's always the disks toward the bottom of the fstab that fail. When I look at the syslog, I have the following entries that appear relevant:
Nov 26 09:13:16 h2 systemd[1]: Found device HUS724040ALS640 disk-092.
Nov 26 09:13:16 h2 systemd[1]: Found device HUS724040ALS640 disk-096.
Nov 26 09:13:16 h2 systemd[1]: Mounting /mnt/shelf/4/092...
Nov 26 09:13:16 h2 systemd[1]: Mounting /mnt/shelf/4/096...
Nov 26 09:13:16 h2 systemd[1]: Mounted /mnt/shelf/1/014.
Nov 26 09:13:16 h2 systemd[1]: Mounted /mnt/shelf/3/069.
Nov 26 09:13:16 h2 systemd[1]: Found device HUS724040ALS640 disk-088.
Nov 26 09:13:16 h2 systemd[1]: Mounting /mnt/shelf/4/088...
Nov 26 09:13:16 h2 systemd[1]: Mounted /mnt/shelf/4/092.
Nov 26 09:13:16 h2 systemd[1]: Mounted /mnt/shelf/4/096.
*snip*
Nov 26 09:13:16 h2 systemd[1]: mnt-shelf-4-073.mount: Job mnt-shelf-4-073.mount/start failed with result 'dependency'.
Nov 26 09:13:16 h2 systemd[1]: dev-disk-by\x2dlabel-disk\x2d073.device: Job dev-disk-by\x2dlabel-disk\x2d073.device/start failed with result 'timeout'.
Nov 26 09:13:16 h2 systemd[1]: dev-disk-by\x2dlabel-disk\x2d074.device: Job dev-disk-by\x2dlabel-disk\x2d074.device/start timed out.
Nov 26 09:13:16 h2 systemd[1]: Timed out waiting for device /dev/disk/by-label/disk-074.
Nov 26 09:13:16 h2 systemd[1]: Dependency failed for /mnt/shelf/4/074.
Nov 26 09:13:16 h2 systemd[1]: mnt-shelf-4-074.mount: Job mnt-shelf-4-074.mount/start failed with result 'dependency'.
Once booted, I get around this issue by manually mounting the disks that failed during boot.
I believe there is some sort of systemd startup ordering issue (maybe a missing fstab option I can use?) or dependency issue that is causing systemd to timeout waiting for the disk devices to properly enumerate fully.
Any ideas on where I can begin to look here?