Home > Operation and Maintenance > Linux Operation and Maintenance > Why is the linux mount point still occupied after uninstalling it?

Why is the linux mount point still occupied after uninstalling it?

尊渡假赌尊渡假赌尊渡假赌
Release: 2023-06-26 14:40:25
Original
2216 people have browsed it

The Linux mount point is still occupied after uninstallation because the mount point is still used by processes before uninstallation, or there are some file handles that are preempted and cause the uninstallation to fail. The solutions are: 1. Use the "lsof" command Check for any processes that have open files, directories or subdirectories in the mount point, and close these processes; 2. Use the "fuser" command to find the users of the files or directories and kill them; 3. Try to use "umount -f /mnt/mount-point" command.

Why is the linux mount point still occupied after uninstalling it?

The operating system of this tutorial: Linux5.18.14 system, Dell G3 computer.

When a file system or device is mounted on a Linux system, it is associated with a specified mount point. If you want to unmount a mount point, you need to execute the `umount` command. However, after uninstalling, you may find that the disk space occupied by the mount point is still occupied, resulting in a waste of disk space. This may be because the mount point is still in use by a process before unmounting, or there are some file handles that are preempted and cause the unmount to fail.

To solve this problem, you can try the following steps:

1. Make sure that no process is using the mount point: you can use the `lsof` command to check for any open files in the mount point. directory or subdirectory and shut down those processes. For example, you can use the following command to get detailed information about the `/mnt/mount-point` mount point:

   ```
   lsof /mnt/mount-point
   ```
Copy after login

2. Use the `fuser` command to find the users of a file or directory and kill them. It looks like this:

   ```
   fuser -km /mnt/mount-point
   ```
Copy after login

In this command, `-k` means forcefully killing the process, and `-m` means all mounted file systems.

3. If you still cannot uninstall, you can try using the following command:

   ```
   umount -f /mnt/mount-point
   ```
Copy after login

In this option, `-f` means forcefully uninstalling the file system. This usually results in data loss, so only use this option if you are sure that all other possible steps have been taken.

By executing the above steps, you can fully release the occupied mount points

The above is the detailed content of Why is the linux mount point still occupied after uninstalling it?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template