Aix who is using a file
If, for some reason, you need to know this, you could check every directory within the file system using as many "fuser -c" commands as it took. But, since the user could be currently located in any subdirectory and might move while you are checking, this process could be both slow and problematical. You might try looping through all the subdirectories in the file system using a loop and an embedded find command like that shown below, but you would soon discover that the find command, in accessing each subdirectory, also ends up "using" it and, therefore, reporting itself in the process.
In fact, every directory would be listed in the output of this command. While I don't advocate tossing users off systems without due courtesy, I have often found that users who are keeping a file system busy have been idle for hours. Interestingly, editing a file does not, by itself, keep a file system busy.
The -k option doesn't work on a mount point. Once you identify a process that is using a particular directory or file, you can terminate the process using the kill command. Alternately, if you identify the particular file or directory that is being used, you can use fuser's -k command to kill it. If a file system is busy because of user activity, the most expedient way to make the file system non-busy is to list the processes keeping it busy and terminate each process with a kill In the commands below, I have verified that the user is not actively working before terminating his or her process, but you will have to weigh the interests of your users' processing needs against your need to unmount the file system.
Linux systems also include the fuser command, but with different options than Solaris. If you are administering Linux systems, you should check the man command for the fuser implementation on your system.
Sandra Henry-Stocker has been administering Unix systems for more than 30 years. She describes herself as "USL" Unix as a second language but remembers enough English to write books and buy groceries. She lives in the mountains in Virginia where, when not working with or writing about Unix, she's chasing the bears away from her bird feeders. Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.
Save my name, email, and website in this browser for the next time I comment. Notify me of followup comments via e-mail. You can also subscribe without commenting. This site uses Akismet to reduce spam. Learn how your comment data is processed. If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts?
Related Posts. Thank you Reply. Got something to say? The storage has been provisioned to the CDOM. Please help. Error encountered in creating a filesystem.
Hi experts, Need help on the below error please. I am creating Filesystem and it fails with the below errors : Command: failed stdout: yes stderr: no Before command completion, additional instructions may appear below.
Red Hat. Creating filesystem on new LUN. I want the filesystem to be a ext3 Post updated at AM Previous update was at AM Found the answer. This thread can be closed. Filesystems, Disks and Memory. Creating filesystem of 2MB size. I try to do the partitioning and specify the size as 2MB but the partition editor automatically resize it to 8MB. I know that this is possible and the Trace the process responsible for locking filesystem?
Hi, Sometimes when I want to unmount some filesystem I get "The requested resource is busy. In such a case I try to find and kill process that uses that filesystem. I do that on random. Is there a right way to find whitch prosesses use filesystem resource at given time?
How to correctly allocate size while creating FileSystem. Hello - I am finding difficulty in creating and allocating correct size to File Systems on solarix x86 box. Creating a shared filesystem.
0コメント