[comp.sys.next] Optical disk problem

rwb@vi.ri.cmu.edu (Bob Berger) (08/03/89)

I'm having lots of problems using the optical disks. My latest
problem occurred when I inserted a disk while I was still logging in.

The machine mounted the disk at some unknown place in the file system.
Even after power cycling the machine, it insists that this disk is mounted
on volume 0. However, I cannot find a directory entry for it to use with
the unmount command in the browser.

How can I force the system to unmount a disk I don't have a directory entry
for?

rwb@vi.ri.cmu.edu

jgreely@oz.cis.ohio-state.edu (J Greely) (08/03/89)

In article <5741@pt.cs.cmu.edu> rwb@vi.ri.cmu.edu (Bob Berger) writes:
>I'm having lots of problems using the optical disks. My latest
>problem occurred when I inserted a disk while I was still logging in.

Yeah, that'd cause a problem.  I've never done it myself, due to my
native skepticism about the internals of autodiskmount, but I've
managed some similar things.

>Even after power cycling the machine, it insists that this disk is mounted
>on volume 0. However, I cannot find a directory entry for it to use with
>the unmount command in the browser.

Minor confusion here.  The *disk* is mounted in the drive, but the
file system on the disk is not mounted in the directory hierarchy.
You don't want to unmount the file system, you want to eject the disk.
However, since the disk was not inserted under the Workspace, it can't
be gotten rid of through it.

>How can I force the system to unmount a disk I don't have a directory entry
>for?

Several solutions are available.  The first is "ask the
administrator".  If you *are* the administrator, try this:

1. su to root
2. run the "df" command, to make sure that the disk is not, in fact,
   mounted.  (look for a line containing /dev/od0a in the first column)
3. If it's mounted, use the command "umount /mnt", replacing /mnt with
   the name of the directory the OD is mounted on (last column, same line).
4. Very, very carefully type "disk -e /dev/rod0a".  The disk command
   can destroy all of the information on your disk without asking, so
   be sure you use it correctly (it, of course, has no manual page).

At this point, the disk should pop out.  If it doesn't, you've got a
problem, and should try the ruder method below.

The rude way to get your disk back:

Halt the machine.  From the monitor, type "ej" (if you don't know how
to get to the monitor, look it up in the Librarian).  This should spit
out the disk.  If this doesn't work, power-cycle the machine, halt it
on the way up, go to the monitor, and try "ej".  If *this* doesn't
work, break out the handy NeXT-issue icepick and forcibly eject the
disk by hand, being careful to follow the instructions in the book
(see page 233 in the Users Reference Manual).

  I've never had to resort to the icepick, but I have managed to lock
it up so badly that I had to power-cycle to get my disk back.

  Note that if you eject your disk the rude way, it won't be accepted
the first time you try to insert it again.  Don't panic!  It'll take
it on the second (or worst-case third) try.

-=-
J Greely (jgreely@cis.ohio-state.edu; osu-cis!jgreely)

jpd00964@uxa.cso.uiuc.edu (08/04/89)

> How can I force the system to unmount a disk I don't have a directory entry
> for?

if you have super user access, you can do it with either the disk or unmount
command.  If you want to get the disk out, type disk -e /dev/rod0a.
The -e is eject and /dev/rod0a is the path for the raw optical disk 0.

unmount works similiar, but with the /dev/od0a.  First type "mount" to 
find all of the mounted devices.  the type umount all of the optical disk
devices that you do not want.

If you do not have super user access, then find someone who does.

Michael Rutman
Softmed

dz@casaba.ucsb.edu (Daniel James Zerkle) (08/05/89)

In article <5741@pt.cs.cmu.edu> rwb@vi.ri.cmu.edu (Bob Berger) writes:
>I'm having lots of problems using the optical disks. My latest
>problem occurred when I inserted a disk while I was still logging in.
>The machine mounted the disk at some unknown place in the file system.
>Even after power cycling the machine, it insists that this disk is mounted
>on volume 0. However, I cannot find a directory entry for it to use with
>the unmount command in the browser.

You've disk-covered yet another annoying bug in the 0.9 release.
Sometimes the autodiskmount command will utterly flake out, and
you have to do things manually (probably as root).

The first thing to try is the simple "/etc/mount" command (you do not
have to be root to do this).  This will report what disks are mounted
where.  The optical disk is /dev/od0a and the hard disk is /dev/sd0a.

One thing that works to get a stuck disk out without su'ing to root
is to use the "mount" command from the window manager (browser).
This will often spit the disk out and ask you to put in another or
press "n" to cancel.  Pressing "n" can cause infinite problems
(another bug), so be careful.

If the mount command did not report an optical drive, you will never
find the directory where it is mounted, because it isn't.  You will
have to get it mounted yourself.  As root, type something like:

# mount /dev/od0a /opt

which will mount the disk on /opt.

If you want to get the disk out, first make sure it is not mounted.
(Using eject from the window manager is fine under normal circum-
stances, but you MUST re-insert the disk and unmount it later, before
logging out, or all Hell breaks loose.  Better to always unmount a
disk before ejecting it, if you can.)  You can manually unmount the
disk (as root, probably), with

# umount /opt

which will unmount any disk mounted on /opt.  Not that if any program
has files open on the disk, or even has a current directory there
(including csh and WM 28), this won't work.  Disk twiddling is best
done with nobody around and just one terminal or shell window.
As root, you can manually eject the disk with:

# disk -e /dev/rod0a

After this, you can try just popping the disk back into the drive,
in hopes that it will end up automounted in your home directory.
Hopefully, these leftover bugs will be cleaned up by release 1.0.

In case you hadn't figured it out on your own, the root password
will let you unmount the disk from a user's home directory, and
mount it somewhere else, where it will not be ejected when the
user logs out.  It will just stay there until it gets unmounted
and ejected.  This avoids the usual automount problems, although
it means that ordinary users can not use their own disks.  The best
way to avoid bugs is to never, NEVER press the 'n' key when you are
requested to insert a disk (especially one that is already mounted,
but merely ejected), unless you really have to do it.
| Dan Zerkle home:(805) 968-4683 morning:961-2434 afternoon:687-0110  |
| dz@cornu.ucsb.edu dz%cornu@ucsbuxa.bitnet ...ucbvax!hub!cornu!dz    |
| Snailmail: 6681 Berkshire Terrace #5, Isla Vista, CA  93117         |
| Disclaimer: If it's wrong or stupid, pretend I didn't do it.        |