Making a RAM disk in Mac OS X

kernelthread.com: Mac OS X Filesystems

This page explains (among other things) how to make a RAM disk in Mac OS X. They use newfs_msdos in their example, but newfs_hfs works as well. I didn't need to partition the disk using pdisk to make it work, even though 'man newfs_hfs' says the device needs to be partitioned first. I'm guessing newfs_hfs makes a single partition that covers the whole RAM disk if it finds no partition table.

If you want a simpler utility to make a RAM disk, you might try RAM Disk Creator. I haven't tried it though.

I think one nice thing RAM Disk Creator can do that those instructions don't cover is having the mounted filesystem appear in /Volumes and be browseable in the Finder. When I browsed to the mount point in Finder, it showed the volume as an alias and didn't let me dive into it, even though I could cd into it and copy files to it from the command line.

Written on January 3, 2005