Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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