Why Can't I Mount a Disk on an Old Mount Point by Modifying fstab in CentOS 7?
Symptom
File /etc/fstab was modified to allow a new disk to be mounted on an old mount point. The mounting failed when queried using the df command.
The operations described in this section apply to ECSs running CentOS or EulerOS.
Possible Cause
- Run the following command to query the involved mount unit:
systemctl list-units --type=mount |grep failed
test1.mount loaded failed failed /test1
- Run the following command to query the unit status:
Information similar to the following is displayed:
● test1.mount - /test1 Loaded: loaded (/etc/fstab; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2019-08-28 15:32:53 CST; 3min 27s ago Where: /test1 What: /dev/vdb1 Docs: man:fstab(5) man:systemd-fstab-generator(8) Process: 4601 ExecUnmount=/bin/umount /test1 (code=exited, status=0/SUCCESS) Process: 3129 ExecMount=/bin/mount /dev/vdb1 /test1 -t ext4 (code=exited, status=0/SUCCESS) ... ... Warning: test1.mount changed on disk. Run 'systemctl daemon-reload' to reload units.
In the command output, mount unit test1.mount has changed. Run systemctl daemon-reload to reload units.
The changes in fstab do not get applied automatically. You must run the systemctl daemon-reload command to update the mount units generated for each entry in fstab.
Solution
Run the following command to reload the mount units managed by systemd:
systemctl daemon-reload
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot