Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

unmounting something that doesn't want to be...



I tried mounting a USB HFS disk; I now can't unmount it.

I know the disk is formatted for HFS; I created it that way on a Mac,
and Linux agrees.  When I plugged it in to NetBSD, it said

#        size    offset     fstype [fsize bsize cpg/sgs]
 d: 976773168         0     unused      0     0        # (Cyl.      0 -
969020) e: 976768002        63    unknown                     #
(Cyl.      0*- 969015*)

apmlabel said the same thing.

Since I knew it was really HFS, I tried

        mount -r -t hfs /dev/sd0e /mnt

which was quietly accepted.  Using it, however, failed:

# ls /mnt
ls: /mnt: Bad file descriptor
# ls /mnt
ls: /mnt: Invalid argument
# ls -l /mnt
ls: /mnt: Invalid argument
# umount /mnt
umount: /mnt: Invalid argument

I do not know why "ls" first got "Bad file descriptor" and then
"Invalid argument".  What's more serious is that "umount" gets
"Invalid argument", whether I reference the file system or the device.
I can read at least the initial portion of sd0d with "dd", so the
hardware is visible to the system.  "dmesg" shows this:

hfs: all records greater than key
hfs: could not find root parent
hfs: all records greater than key
hfs: could not find parent thread for cnid 2
hfslus: hfs_vop_getattr(): invalid record type 0hfslus:
hfs_vop_getattr(): invalid record type 0hfslus: hfs_vop_getattr():
invalid record type 0hfslus: hfs_vop_getattr(): invalid record type
0hfslus: hfs_vop_getattr(): invalid record type 0hfslus:
hfs_vop_getattr(): invalid record type 0hfslus: hfs_vop_getattr():
invalid record type 0

Any suggestions on how to unmount it?  ("umount -f" gets the same
failure.)


                --Steve Bellovin, http://www.cs.columbia.edu/~smb


Home | Main Index | Thread Index | Old Index