Help Center/ Elastic Cloud Server/ Troubleshooting/ Disk Space Management Issues/ Why Can't I Mount a Disk on an Old Mount Point by Modifying fstab in CentOS 7?
Updated on 2024-08-15 GMT+08:00

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

  1. Run the following command to query the involved mount unit:

    systemctl list-units --type=mount |grep failed

    test1.mount             loaded failed failed  /test1
  1. Run the following command to query the unit status:

    systemctl status test1.mount

    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