XK0-005 · Question #668
A Linux administrator is troubleshooting a systemd mount unit file that is not working correctly. The file contains: [root@system] # cat mydocs.mount [Unit] Description=Mount point for My Documents…
The correct answer is A. Rename the mount file to home-user1-My\x20Documents.mount. E. Change the Where entry to Where=/home/user1/My\x20Documents. systemd has two requirements for mount unit files with special characters in the path. First, the unit filename must mirror the mount point path with slashes replaced by hyphens and special characters encoded-spaces must be encoded as '\x20', making the correct filename…
Question
A Linux administrator is troubleshooting a systemd mount unit file that is not working correctly. The file contains:
[root@system] # cat mydocs.mount [Unit] Description=Mount point for My Documents drive [Mount] What=/dev/drv/disk/by-uuid/94afc9b2-ac34-ccff-88ae-297ab3c7ff34 Where=/home/user1/My Documents Options=defaults Type=xfs [Install] WantedBy=multi-user.target The administrator verifies the drive UUID correct, and user1 confirms the drive should be mounted as My Documents in the home directory. Which of the following can the administrator do to fix the issues with mounting the drive? (Choose two.)
Options
- ARename the mount file to home-user1-My\x20Documents.mount.
- BRename the mount file to home-user1-my-documents.mount.
- CChange the What entry to /dev/drv/disk/by-uuid/94afc9b2-ac34-ccff-88ae-297ab3c7ff34.
- DChange the Where entry to Where=/home/user1/my\ documents.
- EChange the Where entry to Where=/home/user1/My\x20Documents.
- FAdd quotes to the What and Where entries, such as What="/dev/drv/disk/by-uuid/94afc9b2-ac34-
How the community answered
(29 responses)- A76% (22)
- B14% (4)
- C7% (2)
- F3% (1)
Explanation
systemd has two requirements for mount unit files with special characters in the path. First, the unit filename must mirror the mount point path with slashes replaced by hyphens and special characters encoded-spaces must be encoded as '\x20', making the correct filename 'home-user1-My\x20Documents.mount' (Answer A). Second, the 'Where=' entry in the unit file must also encode the space as '\x20': 'Where=/home/user1/My\x20Documents' (Answer E). Option B uses lowercase and hyphens instead of the correct path encoding. Options C, D, and F use incorrect escape syntax not recognized by systemd for these fields.
Topics
Community Discussion
No community discussion yet for this question.