Operating System - HP-UX
1826347 Members
3927 Online
109692 Solutions
New Discussion

"Device Busy" while mounting CDROM

 
Suraj Singh_1
Trusted Contributor

"Device Busy" while mounting CDROM

Hi All,

I know the problem sounds very similar to a lot of other threads in this forum, but i am unable to resolve this error.

I get "/dev/dsk/c0t0d0: Device busy" when i issue "mount /dev/dsk/c0t0d0 /cdrom" command.

1) ioscan shows
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/3/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0

2) fuser shows:
# fuser /dev/dsk/c0t0d0
/dev/dsk/c0t0d0:

# fuser /cdrom
/cdrom:

3) CD is in the CDROM drive.
4) diskinfo /dev/rdsk/c0t0d0:
diskinfo: can't open /dev/rdsk/c0t0d0: Device busy

Any ideas??
What we cannot speak about we must pass over in silence.
11 REPLIES 11
Sudeesh
Respected Contributor

Re: "Device Busy" while mounting CDROM

Probably your drive is faulty. But before coming at this conclusion you can try with diffrent CD media.


Sudeesh
The most predictable thing in life is its unpredictability
Stephen Keane
Honored Contributor

Re: "Device Busy" while mounting CDROM

mount -F cdfs /dev/dsk/c0t0d0 /cdrom

Suraj Singh_1
Trusted Contributor

Re: "Device Busy" while mounting CDROM

mount -F cdfs ... also gives the same error.
What we cannot speak about we must pass over in silence.
Hoang Chi Cong_1
Honored Contributor

Re: "Device Busy" while mounting CDROM

First, check to make sure that the CDROM hasn't mounted yet:
#bdf
If it was mounted unmount first!
Then check for the disk device file:
#ioscan -fnC disk
Seem that the device is not corect!
Try with:
#insf -eC disk

Mount again:
#mount -F cdfs /dev/dsk/c#c#d# /cdrom

Goodluck!
Regard,
Hoang Chi Cong
Looking for a special chance.......
Suraj Singh_1
Trusted Contributor

Re: "Device Busy" while mounting CDROM

Thanks for all these replies, but i already tried these steps, but the system still gives me the same error.

After restarting the server, and using the same command, it worked.

Any ideas why?
What we cannot speak about we must pass over in silence.
Stephen Keane
Honored Contributor

Re: "Device Busy" while mounting CDROM

It is possible that the drive was locked. If the process that locked the drive then exited, the drive would remain locked until an unlock message was sent to it, or the power to it was cut (as would be the case during a reboot).

Another process trying to obtain a lock on the drive (which it would need in order to mount the CD) would fail and show a message indicating that the drive was busy.
Suraj Singh_1
Trusted Contributor

Re: "Device Busy" while mounting CDROM

Thanks Stephen,

But how do we issue unlock signal without rebooting the server?

I tried fuser on both mount point as well as the physical path, but that did not show me anything.
What we cannot speak about we must pass over in silence.
Stephen Keane
Honored Contributor

Re: "Device Busy" while mounting CDROM

The only way I know of is to write a short C program that issues the correct SCSI unlock command to the drive. Although the CD-ROM is an IDE command, you can interact with it using a SCSI command. (SIOC_IO via ioctl)

If you want to explore that route, I could post an example program for you. Be aware that unlocking a CD-ROM whilst another process has a lock open on it, is not a good idea and may cause a system panic.

In your case, I suspect whatever locked the CD-ROM device has died.
Stephen Keane
Honored Contributor

Re: "Device Busy" while mounting CDROM

BTW, the lock is in the drive itself, it is not an operating system lock, it's a firmware lock. So standard Unix tools can't see it.
Stephen Keane
Honored Contributor

Re: "Device Busy" while mounting CDROM

One other thought, if the drive is locked, it should in theory NOT eject the caddy if you press the drive eject button.
Suraj Singh_1
Trusted Contributor

Re: "Device Busy" while mounting CDROM

Thanks for the explaination stephen.
What we cannot speak about we must pass over in silence.