Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unmount: 0506-349 Cannot unmount /dev/cd0: The requested resource is b

Status
Not open for further replies.

ap1605

Programmer
Mar 12, 2003
35
NL
unmount: 0506-349 Cannot unmount /dev/cd0: The requested resource is busy

We have a problem to unmount the cdrom ? Only a reboot will help.

/home/root [root@tst] # > unmount /cdrom
unmount: 0506-349 Cannot unmount /dev/cd0: The requested resource is busy.
/home/root [root@tst] # > fuser -u /dev/cd0
/dev/cd0:
/home/root [root@tst] # > fuser -k /dev/cd0
/dev/cd0:
/home/root [root@tst] # > unmount /cdrom
unmount: 0506-349 Cannot unmount /dev/cd0: The requested resource is busy.
/home/root [root@tst] # >

Our operating system is AIX 5.1 ML 03

Thank you for the help,

Guus Grijpink
 
Assuming from the above that you're not actually within the /cdrom directory when trying to unmount it, you could use fuser /cdrom to see what user/process is using the cdrom and then ps -ef | grep <user> to find it's PID and kill it (assuming it's safe to do so, of course!). HTH.
 
That is just the problem (See output). I´m not in the directory. There are no processes using /cdrom.

Thanks anyway
 
And there's nothing in a ps -ef | grep cdrom which might indicate the problem?
 
Nothing.

/usr/local/etc [root@tst] # > ps -ef|grep cdrom
root 40732 186578 1 10:24:54 pts/14 0:00 grep cdrom
/usr/local/etc [root@tst] # >
 
Take a look at:
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof
This utility will show you all the open files

Hope This Help
PH.
 
Say!
I think I have the answer for you take a look at:


Just for TT'rs heres what it says:

0506-349 Cannot unmount String
Possible Causes
This error message is displayed with the following text:

Only the owner or a privileged user can perform the operation.
for one of the following reasons:

You used the System Management Interface Tool (SMIT) to unmount a file system and do not own the file system, do not belong to the system group, or do not have access permissions.
You used the unmount or umount command to unmount a file system and do not own the file system, do not belong to the system group, or do not have access permissions.

This error message is displayed with the following text:

A device is already mounted or cannot be unmounted.



for one of the following reasons:
Using SMIT, you specified the name of a file system that has an active device mounted over it.

You used the unmount or umount command to unmount a file system that has an active device mounted over it.

Procedures for Recovery
Obtain the proper access permissions.
Select the SMIT Physical and Logical Storage--> File Systems--> Unmount a File System--> NAME of file system to unmount menu option.
Select List to display a list of available file systems.
Choose a file system to unmount.
Select Do to unmount the file system.
OR
Use the su command to change to the root user, or to a user who belongs to the system group and has write permission to the directory in which the file system is mounted.
Use the umount or unmount command to unmount the file system.
Remove active devices before unmounting a file system.
Select the SMIT Physical and Logical Storage--> File Systems--> Unmount a File System--> NAME of file system to unmount menu option.
Select List to display a list of available file systems.
Select a file system to unmount.
Select Do to unmount the file system.
OR
Use the ps -ef command to ensure that none of the files contained in the file system are being accessed by any user.
When all file access stops, use the umount or unmount command to unmount the file system.

Good Luck
Laurie.
 
Just a thought: I'm wondering if you could do a rmdev to remove the CD device rather than having to reboot the system? Then do a cfgmgr to bring it back into the system.

You are root, you aren't in the mount directory, so you should be able to umount it. Would a zombie process prevent the unmounting?

 

I don't think a zombie can have open file handles.

A classic mistake is to go to the /cdrom directory as a normal user,
su to root and then try to unmount it. Even if you change root's CWD
the other user will still be in that directory.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Thanks, for all the respons. I also could´t remove he device and unmount the cd under smit. IBM also didn´t know what the problem was. They have changed te cdrom and everything looks fine now.

 
Sorry it works 1 time manualy. I have the problem again under Smit.

/dev/cd0 /.cd_BlYPqc cdrfs Aug 05 08:40 ro
 
Take a look at:
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof
This utility will show you all the open files
If you don't want to compile yourself and if you aren't paranoid about download of executables, they are binaries for your platform at:
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/binaries/aix

Hope This Help
PH.
 
I have used lsof to list all open files on device /dev/cd0
Nothing to see.

/dev/cd0 /.cd_BlYPqc cdrfs Aug 05 08:40 ro
/tmp [root@tst] # > lsof /dev/cd0
/tmp [root@tst] # >
 
And this ?
Code:
lsof | grep cd0

Hope This Help
PH.
 
Nothing to see.

/home/ap1605 [ap1605@tst] $ > su -
root's Password:
/home/root [root@tst] # > lsof | grep cd0
/home/root [root@tst] # >
 
IBM came with a solution to install bos.rte.filesystem 5.1.0.36. We also have installed the latest firmware level for the cd.
But all these things, no effect !!!. 1 time it looks good an other time won´t.

Regards Guus Grijpink.



cd0 40-60-00-1,0 SCSI Multimedia CD-ROM Drive (650
MB)

Manufacturer................IBM
Machine Type and Model......CDRM00203
ROS Level and ID............1_03
Device Specific.(Z0)........058002028F000018
Part Number.................97H7795
EC Level....................F16560
FRU Number..................97H7610
 
IBM now advices to install ML-04 for AIX5.1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top