In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you what is the solution that can not be uninstalled in Linux system. The content is concise and easy to understand, and it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
In our daily operation and maintenance, we often encounter operations such as disk expansion, unmounting, mounting, and so on, but sometimes the applications running on this system do not stop or other OPS colleagues are operating this directory, so we cannot directly uninstall it by umount at this time, so today we will share with you how to deal with this problem reasonably.
Phenomenon description: here we need to uninstall the / mnt directory, as shown in the following figure:
After executing the uninstall command: umount / mnt, it is found that the uninstall cannot be done, and the resource is prompted to be occupied, as shown in the following figure:
As we have seen above, the prompt is occupied and cannot be uninstalled. How to deal with it? The method is simple, you can use forced uninstall, and the command is as follows:
[root@docker /] # umount-f / mntumount2: Device or resource busyumount: / mnt: device is busyumount2: Device or resource busyumount: / mnt: device is busy
The-f parameter is for forced unloading, and here we also found that the forced unloading used above did not take effect, or if an error was reported, what should we do? Don't worry, look below!
Using the fuser command, first confirm which processes are occupying the directory
[root@docker /] # fuser-cu / mnt / mnt: 1112c (java)
The above view shows that the java process with a pid of 1112 is currently occupying this directory, so it cannot be uninstalled.
So after we have confirmed which process occupies this directory, we can kill the process.
There are two ways to kill the process:
The first is the direct command we usually use: kill-9 1120.
The second is to use fuser-ck / mnt
[root@docker /] # fuser-ck / mnt/mnt: 1120c
When we need to know which directory is occupied by which process, we can also use the lsof command to check it.
The above content is what is the solution that can not uninstall and mount in Linux system. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.