I followed these instructions for creating a ramdisk on OSX. Now I can't unmount the disk despite not using it (lsof verifies nothing is using the disk).

Instructions to create:

$ hdid -nomount ram://32768
$ newfs_hfs /dev/disk1
$ mkdir /tmp/ramdisk1
$ mount -t hfs /dev/disk1 /tmp/ramdisk1

To unmount (does NOT work):

hdiutil detach /dev/disk1

The message I get is:

"disk1" unmounted.
hdiutil: couldn't eject "disk1" - Resource busy

The -force switch has no effect. Also, issuing the command as root has no effect.

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

have you umounted it with umount /tmp/ramdisk1 first? hdiutil detach only removes device, but doesn't aware about mount points.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.