Mount the same ext4 filesystem at /srv/docs even if disk detection order changes.
Its UUID is 1111-2222.
Which value belongs in the first fstab field?
UUID=... identifies the filesystem independently of /dev/sdX detection order. blkid can show the UUID.
Detailed explanation
/dev/sdb1Incorrect. /dev/sdb1 can change when device detection order changes.
/srv/docsIncorrect. /srv/docs is the mount target, not the source identifier.
UUID=1111-2222Correct. UUID=1111-2222 identifies the filesystem for fstab.
TYPE=ext4Incorrect. TYPE=ext4 is not unique when multiple ext4 filesystems exist.
Try it yourself
An example you can run in a temporary verification environment.
findmnt --verify --verbose 2>&1 | sed -n '1,12p'Expected result
現在のfstab構文・参照先の検証結果。環境設定により警告が出る場合があるKey points
- UUID identifies a filesystem
- blkid retrieves it
- It is more stable than a device name
Notes
- Environment: util-linux findmnt / 読み取り検証
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
A filesystem UUID identifies the content; a mount point identifies where it is attached.
Check the side effect
Update fstab if the filesystem is recreated and receives a new UUID.