Americas

  • United States
sandra_henrystocker
Unix Dweeb

DVD mounting problems

Analysis
Jun 19, 20083 mins
Data CenterLinuxOpen Source

Most of my systems do not have CD/DVD drives but only CD drives so when I need to load software from a DVD drive onto a system which lacks such a drive, I have to mount it from another system, share it and then mount it on the system on which I want to extract the software. This is a little painful, but it generally works.

For example: dvd# mount -F hsfs -o ro /dev/sr0 /cdrom (assuming vold is not running the show)

dvd# share /cdrom/my_app

And on the target system:

no-dvd# mount dvd:/cdrom/my-app /cdrom

When I’m done, I simply reverse the process. I unmount the DVD from the target system and then unshare and unmount it on the system with the DVD drive:

no-dvd# umount /cdrom

On the system with the DVD drive: dvd# unshare /cdrom/my_app

dvd# umount /cdrom

dvd# eject

The process generally runs smoothly. I ran into a problem, however, when the system with the DVD drive refused to eject the DVD media, yet also failed to acknowledge that the media was still in the drive. If I issued the eject command, the system issued a “No such device” error. If I tried mounting the media, the system told me that either /dev/sr0 or the mount point was busy.

While we found that we could forcefully eject the DVD with the paper clip trick (straighten out the end of a paper clip and poke it into the small hold on the drive), the system itself didn’t recover from the apparent conundrum. It could neither accept and mount new media nor eject anything via the normal button push or the eject command.

In retrospect, one potential cause of the problem was that the rack door was closed when I first tried to eject the DVD. The drive drawer would have then opened, hit the rack door before it fully ejected and closed again, possibly leaving the device in the confused state in which it viewed /dev/sr0 as busy while simultaneously claiming there was nothing in the drive to be ejected.

Reboots are not always convenient or possible since many users are often logged in and productively working on various projects. A delay in my getting the new software installed was going to be much less consequential than interrupting half a

dozen users. so, I had to find a way around the problem or postpone the software install until a time when the system could be rebooted without affecting users.

Eventually, the problem was resolved. A “umount -f” command cleaned up the problem with /dev/sr0 being busy when nothing was actually in the drive.

Another command that was useful in getting a device-level view of what was going on with the system was “iostat -En”. # iostat -En

c0t6d0      Soft Errors: 6 Hard Errors: 108 Transport Errors: 7

Vendor: TOSHIBA Product: DVD-ROM SD-M1401 Revision: 1009 Serial No: 12/20/00

Size: 18446744073.71GB <-1 bytes>

Media Error: 99 Device Not Ready: 9 No Device: 0 Recoverable: 0

Illegal Request: 6 Predictive Failure Analysis: 0

This output, on the other hand, indicates a large number of errors for a DVD drive which has been more or less working properly. The nature and origin of 108 hard errors and 99 media errors is worth looking into.

sandra_henrystocker
Unix Dweeb

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.

The opinions expressed in this blog are those of Sandra Henry-Stocker and do not necessarily represent those of IDG Communications, Inc., its parent, subsidiary or affiliated companies.

More from this author