In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to force uninstall connection points under linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Fuser-km / soft
Umount-f / soft
Linux Command Fuser detailed explanation
Use files or sockets to represent the recognition process. I often use his two functions: check the process I need and I want to kill the process I found.
For example, when you want to umount CD-ROM drive, the system tells you that the device is in use or busy, but you can't find out who used it. Fuser can come in handy at this time.
Eject
Umount: / media/cdrom: device is busy
Umount: / media/cdrom: device is busy
Eject: unmount of `/ media/cdrom' failed
# fuser / mnt/cdrom
/ mnt/cdrom: 4561c 5382c
# ps-ef | egrep'(4561 | 5382)'| grep-v grep
Root 4561 4227 0 20:13 pts/1 00:00:00 bash
Root 5382 4561 0 21:42 pts/1 00:00:00 vim Autorun.inf
In the example, I want to eject the CD-ROM drive, and the system tells me that the device is busy, so I use the fuser command, and the argument is that your file or scoket,fuser will find out who used it. 4561c ID 5382c indicates that the / mnt/cdrom is currently occupied by two processes. The letter after the process ID indicates the way in which resources are occupied. There are several ways:
C current path (current directory.) My understanding is that the occupation of this resource is in the form of a file directory, that is, the path to the resource that needs to be released, which is the most commonly used way of occupying resources.
E is running an executable file (executable being run.), such as running a program on a CD
F opens the file (open file) and ignores it in the default mode. So in the above example, although the Autorun.inf file on the CD is opened, the logo given is c, not f.
R root directory (root directory). Do not understand what it means, does it mean to enter the specific directory of / root?
M mmap file or shared library (mmap'ed file or shared library). This should mean that a process uses a shared file of the resource you want to release.
While searching, you can also specify some parameters, such as:
-k kills the processes that are accessing these files. Unless the signal is modified with-signal, the SIGKILL signal is sent.
-I interaction mode
-l lists all known signal names.
-n space, choose a different namespace, but file,udp,tcp. The default is file, that is, files.
-signal specifies the signal to be sent instead of the default SIGKILL
-4 query only IPV4 sockets
-6 query only IPV6 sockets
-reset all options and set the information back to SIGKILL
Take a look at the following example
# fuser-l
HUP INT QUIT ILL TRAP ABRT IOT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM
STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS
UNUSED
Now let's try the power of fuser-k:
# fuser-k / mnt/cdrom
/ mnt/cdrom: 4561c 5382c
Kill 5382: there is no such process
No automatic removal. Please use umount / media/cdrom
[root@lancy sbin] # eject
The use of socket bytes:
# fuser-4-n tcp 80
Here: 80
80/tcp: 5685 5688 5689 5690 5691 5692 5693 5694 5695
2. Force uninstall nfs that cannot be accessed (unreachable)
[root@f5ha.com ~] # umount-f / web # Force unmount is used to force the unmount network to disconnect the nfs file system that cannot access unreachable
[root@f5ha.com ~] # umount-l / isodevices # Lazy unmount iso system files when you uninstall the hard drive and install the system
This is the end of the content of "how to force uninstall the connection point under linux". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.