This topic describes how to unmount a file system from a Linux Elastic Compute Service (ECS) instance.

Procedure

  1. Log on to the ECS console.
  2. 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:
    1. 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.
    2. 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.
    3. Run the kill <pid> command to terminate the processes.
  3. 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.