This topic describes how to unmount a file system from a Linux Elastic Compute Service
(ECS) instance.
Procedure
- Log on to the ECS console.
- Run the
umount /mnt
command to unmount a Network File System (NFS) file system. Replace the /mnt directory
with the directory that is specific to your environment.
Note We recommend that you do not specify other parameters in the unmount command or modify
the default values of these parameters.
When you unmount a file system, an error message "device is busy" may occur. In this
case, you must perform the following steps to terminate the processes that are accessing
the file system:
- Install fuser.
- For an ECS instance that is running CentOS, Red Hat Enterprise Linux (RHEL), or Aliyun
Linux, fuser is preinstalled.
- For an ECS instance that is running Ubuntu or Debian, run the
apt install -y fuser
command to install fuser.
- Run the
fuser -mv <The domain name of the mount target>
command to view the IDs of the processes that are accessing the file system.
- Run the
kill <pid>
command to terminate the processes.
- Run the
mount -l
command to view the mount information.
If the file system is not displayed in the mount information, the file system is unmounted.