Unmount a CPFS file system from a Linux ECS instance when you no longer need it or before you decommission the instance. This topic describes how to unmount a file system from a CPFS-POSIX or CPFS-NFS client and how to handle a busy file system.
Unmount from a CPFS-POSIX client
-
Connect to the ECS instance that is the installation node for the CPFS-POSIX client. For more information, see Connection methods.
The installation node is the first ECS instance listed in the POSIX Mounting section on the Client Management node page of your CPFS file system.
-
Run the following command to unmount the file system from the target ECS instances.
cpfs del <target_ecs_1_private_ip> <target_ecs_2_private_ip> <target_ecs_3_private_ip>Example:
cpfs del 192.168.1.249 192.168.1.250 192.168.1.251NoteEnter the private IP address of the target ECS instance.
To unmount multiple ECS instances, separate their private IP addresses with a space.
Unmounting an ECS instance takes about 1 minute. For batch unmounts, run the process in the background using
screenornohup.
Unmount from a CPFS-NFS client
Log on to the ECS instance where the CPFS-NFS file system is mounted.
-
Run the
umount /mntcommand to unmount the CPFS-NFS file system. Replace/mntwith the actual mount point path.NoteDo not add any options to the umount command.
If you receive a "device is busy" error, the file system is still in use. You must first terminate the processes that are using it:
-
Install fuser if it is not already installed.
fuser is pre-installed on CentOS and Alibaba Cloud Linux. No installation is required.
On Ubuntu or Debian, run
apt install -y fuser.
-
Run the
fuser -mv <mount_point_path>command to find the process IDs (PIDs) of processes accessing the file system.NoteDo not terminate any kernel-mode process. If a process is running in kernel mode, skip it and proceed to the next one.
Run the
kill <pid>command to terminate the process.
-
-
Disable automatic mounting at startup.
If you configured automatic mounting in
/etc/fstab, remove or comment out the corresponding line to prevent the file system from remounting on reboot. -
Run the
mount -lcommand to verify the result.The file system is unmounted if its mount information no longer appears in the command output.