View previous topic :: View next topic
|
Author |
Message |
Martin Wickenden
New User
Joined: 24 Apr 2018 Posts: 15 Location: USA
|
|
|
|
I am trying to delete some directories and get message saying "RESOURCE BUSY". I enabled the sudo command in IBM ported tools and that does not work either. I get this message:
sudo: main: invoking user identity (XXXXTSO, 7640,595) does not match the invoking process identity (0,595)
How can I tell who is using this directory and how can I delete it please? There are no references to this in the USS commands manual that I can find, thanks, Marty |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
in OMVS will tell you active processes, although uncovering the user ids from the output may require some digging. Did you try with the su command (instead of sudo)? If you tried multiple times and got the same message, I would expect that you will find one of the daemons is using the directory and not necessarily any given user. If that is the case, you most likely do NOT want to delete the directory before doing something about that daemon! |
|
Back to top |
|
|
Martin Wickenden
New User
Joined: 24 Apr 2018 Posts: 15 Location: USA
|
|
|
|
Thanks very much for your valued assistance. I will try to keep my daemons at bay! Marty |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
|
|
I am somewhat new to USS. But I think this solution would work.
From Shell(not ishell) or omvs,
CD to the directory which says that the resource is busy.
Issue command
This would list all the files in the directory + the process number and the user running the process.
Code: |
# cd /u/wells
# fuser -u *
prvt_wells_KEY: 16909001(USERID) 16909001(USERID) <--- resource being held
test_rsa: <--- peaceful resource not being used
test_rsa.pub: <--- peaceful resource not being used
# |
Hope it helps.
Vasanth.S |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
Back to top |
|
|
phunsoft
New User
Joined: 19 Jul 2018 Posts: 11 Location: Switzerland
|
|
|
|
Robert Sample wrote: |
in OMVS will tell you active processes, although uncovering the user ids from the output may require some digging. |
Use
Code: |
ps -ef -ojobname,user,xasid=ASID -opid,ppid,stime,tty=TTY -oargs |
and ps delivers jobname and userid (and some more) for the processes. |
|
Back to top |
|
|
phunsoft
New User
Joined: 19 Jul 2018 Posts: 11 Location: Switzerland
|
|
|
|
Martin Wickenden wrote: |
I am trying to delete some directories and get message saying "RESOURCE BUSY". |
In UNIX you can delete a file or directory even when it is in use by other processes. RESOURCE BUSY is not an indication the file or directory is being used.
It is more likely that the directory you tried to delete is currently being use as an active mount point, and a file system is mounted. The df command should tell you:
Code: |
cd directory-of-interest
df . |
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
|
|
Quote: |
In UNIX you can delete a file or directory even when it is in use by other processes. |
Thanks for the useful information. I didn't knew that. In Mainframe datasets its the opposite |
|
Back to top |
|
|
|