Reported symptoms
- A backup disk in an external enclosure was added to
/etc/fstabon Tuesday. The change was reviewed,mount -awas run, the filesystem mounted, and the ticket was closed. - The host was rebooted on Friday for a kernel update and came up in emergency mode.
- At the emergency prompt
mount -aruns clean anddfshows every filesystem including/srv/backup.systemctl defaultbrings the host fully up. - The operator concluded fstab was fine — after all, it mounted — and rebooted to confirm. It went to emergency mode again.
- Searching the journal for
fstabreturns nothing at all.
Evidence provided
$ sudo journalctl -xb -p err --no-pager
Aug 11 09:02:41 host01 systemd[1]: dev-disk-by\x2duuid-3f9a...device: Job dev-disk-by\x2duuid-3f9a...device/start timed out.
Aug 11 09:02:41 host01 systemd[1]: Timed out waiting for device /dev/disk/by-uuid/3f9a1c7e-2b40-4d1a-9f3e-8c7d6e5b4a21.
Aug 11 09:02:41 host01 systemd[1]: Dependency failed for /srv/backup.
Aug 11 09:02:41 host01 systemd[1]: Dependency failed for Local File Systems.
Aug 11 09:02:41 host01 systemd[1]: emergency.target: Trigger limit hit, refusing further activation.
$ systemctl list-units --type=mount --state=failed
UNIT LOAD ACTIVE SUB DESCRIPTION
* srv-backup.mount loaded failed failed /srv/backup
$ systemctl status local-fs.target
* local-fs.target - Local File Systems
Loaded: loaded (/usr/lib/systemd/system/local-fs.target; static)
Active: failed
$ sudo blkid | grep 3f9a1c7e
/dev/sdd1: UUID="3f9a1c7e-2b40-4d1a-9f3e-8c7d6e5b4a21" TYPE="xfs" PARTUUID="a1b2c3d4-01"
$ grep backup /etc/fstab
UUID=3f9a1c7e-2b40-4d1a-9f3e-8c7d6e5b4a21 /srv/backup xfs defaults 0 2
$ sudo dmesg -T | grep -E 'sdd|scsi 8' | head -3
[Tue Aug 11 09:02:51 2026] scsi 8:0:0:0: Direct-Access ENCL ARRAY 0210 PQ: 0 ANSI: 6
[Tue Aug 11 09:02:53 2026] sd 8:0:0:0: [sdd] 15628053168 512-byte logical blocks
[Tue Aug 11 09:02:53 2026] sd 8:0:0:0: [sdd] Attached SCSI disk
$ systemctl show -p DefaultTimeoutStartSec
DefaultTimeoutStartSec=1min 30s
Work the evidence before reading on
The journal never says “fstab” because systemd does not think in fstab — it thinks in units. Work out these three before continuing:
- Compare the timestamp on
Timed out waiting for devicewith the timestamp onAttached SCSI disk. Which came first, and by how long? blkidfinds the UUID. The device exists. So what exactly timed out — the mount, or something else?- The fstab line says
defaults. Write down whatdefaultsdoes not include before you read the next section.
Root cause
1. fstab is not read at mount time. It is compiled at boot time
systemd-fstab-generator runs early in boot (and again on every
daemon-reload) and turns each fstab line into a generated .mount unit
under /run/systemd/generator/. You can read the result:
systemctl cat srv-backup.mount
That unit gains a Requires= and After= on the .device unit for the
backing device — here
dev-disk-by\x2duuid-3f9a1c7e...device. udev publishes that .device
unit only when the device node and its by-uuid symlink actually exist.
2. defaults does not include nofail
defaults in fstab means rw,suid,dev,exec,auto,nouser,async. It says
nothing about failure behaviour. A mount unit generated from a line
without nofail is pulled in by local-fs.target with Requires=,
which means:
- the target waits for it, and
- if it fails, the target fails.
With nofail, the generator uses Wants= instead and adds
nofail semantics: the mount is attempted, and a failure is logged and
tolerated.
3. local-fs.target failing sends the system to emergency
This is deliberate and it is the right default. systemd cannot know
whether the filesystem that did not appear held /var, a database, or a
backup archive nobody will miss until Sunday. Rather than start services
that may write to the mount point — filling the root filesystem with data
that was supposed to land on the array — it stops and asks a human.
4. The enclosure is 20 seconds too slow
Attached SCSI disk lands at 09:02:53. The device job timed out at
09:02:41, twelve seconds earlier, having waited the default 90 seconds
from the point systemd started the job. The enclosure spins up, negotiates,
and enumerates on its own schedule, and that schedule is longer than
systemd’s patience.
5. Why the recovery prompt was itself a problem
On Debian and Ubuntu the root account is locked by default. sulogin
will not open a shell for a locked account, so instead of a maintenance
prompt the console prints:
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.
Press Enter to continue.
At that point the only way in is the boot loader: interrupt GRUB, append a kernel argument, and boot to a shell.
Resolution
- Get a shell. If the emergency prompt accepts a root password, use it. If root is locked, interrupt GRUB, press
eon the default entry, and append to thelinuxline: - ``
systemd.unit=rescue.target`` - If rescue.target also depends on the failed target, append
init=/bin/bashinstead and remount root writable once you have a prompt: - ``
mount -o remount,rw /`` - Identify the failed unit rather than reading fstab.
systemctl list-units --type=mount --state=failednames it;systemctl statuson that unit gives the reason. Reading fstab tells you what you wrote, not what systemd did with it - Amend the option field. Replace
defaultswith an option set that says what you actually mean: - ``
UUID=3f9a1c7e-2b40-4d1a-9f3e-8c7d6e5b4a21 /srv/backup xfs defaults,nofail,x-systemd.device-timeout=180 0 2`` - Regenerate the units.
sudo systemctl daemon-reloadre-runs the generator. Confirm withsystemctl cat srv-backup.mountthat the options landed — if they did not, the edit has not taken effect and the reboot will fail the same way - Reboot. Not
mount -a, notsystemctl default. Reboot - Consider fixing the enumeration too. A 110-second enclosure is worth a firmware check or a staggered-spinup setting. Raising a timeout accommodates the problem; it does not solve it
Verification
- The generated unit carries the new options.
systemctl cat srv-backup.mountshowsnofailand the device timeout afterdaemon-reload - The host reaches multi-user unattended. Reboot and confirm
systemctl is-system-runningreturnsrunning.degradedmeans something else failed;maintenancemeans you are back in emergency - The filesystem is actually mounted.
findmnt /srv/backupreturns the mount with the expected source and options. A boot that succeeds because the mount was quietly skipped is not a fix - **
local-fs.targetis active.**systemctl status local-fs.targetshows active, andsystemctl list-units --type=mount --state=failedis empty - The nofail path works as intended. Power the enclosure off, reboot, and confirm the host reaches multi-user with
/srv/backupabsent and a logged failure. This is the test that proves you have changed the failure mode rather than only widened a window - **
findmnt --verifyis clean.**sudo findmnt --verify --verbosereports no errors for the amended entry
Prevention
- Every fstab edit is untested until a reboot. Schedule the reboot as part of the change, on a host you can reach the console of.
- Run
sudo findmnt --verify --verbosebefore rebooting. It catches malformed lines, unknown filesystem types and missing mount points — the syntax class of failure — and it will not catch timing. - Default to
nofailfor anything non-essential and express real dependencies withRequiresMountsFor=in the units that have them. - Fix the recovery path before you need it: know whether root is locked on your images, and if it is, make sure console access and a documented GRUB edit are part of the runbook.
- Prefer
UUID=orLABEL=over/dev/sdX, and make sure the UUID is unique — a disk cloned withddgives two devices the same UUID, and theby-uuidsymlink then points at whichever udev saw last.