Refer to the filesystem labeled archive as /srv/archive in fstab.
Use a LABEL tag instead of a device node name.
Which first two fields are appropriate?
fstab uses LABEL=name as a source tag. The source field comes first, followed by the mount point; labels should not be duplicated.
Detailed explanation
/dev/LABEL/archive /srv/archiveIncorrect. /dev/LABEL/archive is not the standard LABEL source syntax.
Incorrect. /dev/LABEL/archive is not the standard LABEL source syntax.
LABEL=archive /srv/archiveCorrect. LABEL=archive /srv/archive places the label source before the mount point.
Correct. LABEL=archive /srv/archive places the label source before the mount point.
/srv/archive LABEL=archiveIncorrect. The mount point and source are reversed.
Incorrect. The mount point and source are reversed.
label:archive /srv/archiveIncorrect. label:archive is not the fstab syntax.
Incorrect. label:archive is not the fstab syntax.
Try it yourself
An example you can run in a temporary verification environment.
blkid -L archiveExpected result
archiveラベルが一意なら対応デバイスパス。存在しない環境では無出力Key points
- Use LABEL= syntax
- The source comes first
- Avoid duplicate labels
Notes
- Environment: util-linux/fstab 5
- 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.