This topic describes how to unmount a Cloud Paralled File System (CPFS) file system from a Linux-based Elastic Compute Service (ECS) instance.
Unmount a file system by using the CPFS-POSIX client
Find an ECS instance in the Client Management Node section of the POSIX Mounting tab, and connect to the node that is used to install the CPFS-POSIX client on the destination ECS instance. For more information, see the Connection methods section of the "Connection method overview" topic.
Run the following command to unmount the CPFS file system from one or more destination ECS instances:
cpfs del <private IP address of the destination ECS instance 1> <private IP address of the destination ECS instance 2> <private IP address of the destination ECS instance 3>Sample command:
cpfs del 192.168.1.249 192.168.1.250 192.168.1.251NoteWhen you unmount the CPFS file system from an ECS instance, enter the private IP address of the ECS instance.
You can unmount the CPFS file system from one or more ECS instances. If you want to unmount the CPFS file system from multiple ECS instances, separate the private IP addresses of the destination ECS instances with spaces.
The more ECS instances to be unmounted, the longer the command takes to run. On average, to unmount the CPFS file system from one ECS instance takes approximately 1 minute. We recommend that you run the preceding command in the background by running the
screenornohupcommand.
Unmount a file system by using the CPFS-NFS client
Log on to the ECS instance to which a CPFS-NFS file system is mounted.
Run the
umount /mntcommand to unmount the CPFS-NFS file system. /mnt is the local directory to which the CPFS-NFS file system is mounted. Replace /mnt with the actual mount directory.NoteWe recommend that you do not specify other parameters in the unmount command or change the default values of these parameters.
If the "device is busy" message appears during the unmount, perform the following steps to terminate the process that is accessing the CPFS-NFS file system:
Install fuser.
For an ECS instance that runs CentOS or Alibaba Cloud Linux, fuser is preinstalled.
For an ECS instance that runs Ubuntu or Debian, run the
apt install -y fusercommand to install fuser.
Run the
fuser -mv <Local directory of the mount target>command to view the ID of the process that is accessing the CPFS-NFS file system. If the process runs in kernel mode, you do not need to terminate the process.Run the
kill <pid>command to terminate the process.
Disable automatic mounting of the file system at startup.
If you configure an automatic mount script for the file system and enable automatic mounting of the file system at startup, you must delete or modify the
/etc/fstabconfiguration file to disable automatic mounting of the file system at startup.Run the
mount -lcommand to view the unmount result.If the CPFS-NFS file system is not displayed in the output, the CPFS-NFS file system is unmounted from the ECS instance.