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.
Incorrect. /dev/sdb1 can change when device detection order changes.
/srv/docsIncorrect. /srv/docs is the mount target, not the source identifier.
Incorrect. /srv/docs is the mount target, not the source identifier.
UUID=1111-2222Correct. UUID=1111-2222 identifies the filesystem for fstab.
Correct. UUID=1111-2222 identifies the filesystem for fstab.
TYPE=ext4Incorrect. TYPE=ext4 is not unique when multiple ext4 filesystems exist.
Incorrect. 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 / 読み取り検証
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.