05-24-2012, 05:12 AM #1
Mounting RAM Disks as "-notremovable"
- Member Since
- Feb 07, 2010
I am replacing my G5 (10.5) Xserve with a late 2008 Xserve (10.6). This server is primarily a web server, with a small amount of mail traffic.
I keep my 'webfolder' on a RAM disk. All of my pages are dymanic php/mysql, so they can't be cached. But reading from RAM is so fast, you'd never know it.
This is the command I used in 10.5 to create a 1 GB RAM disk at boot:
/usr/sbin/diskutil erasevolume HFS+ "web-ram" `/usr/bin/hdiutil attach -notremovable -nomount ram://2200000`
But this flag doesn't work in 10.6. According to the man page, it's still there. But when I use it, I get permissions errors. I am using it with sudo (from the command line, or as root via lanuchdeamons). As I look closer at my errors, It appears that what might be happening is that the diskutil command is being run as root, but the hdiutil command inside of it, is not.
I've had this script working for over two years under a 10.5 system. I also tested it on 10.7 and 10.8 seeds, and it works great on all of them. But on every 10.6 system I've tested, it will not work. But this server must run 10.6. 10.7 Server dropped some of the vital features I need.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By glennt in forum Apple NotebooksReplies: 7Last Post: 05-09-2012, 07:06 AM
By NepentheZ in forum Running Windows (or anything else) on your MacReplies: 1Last Post: 12-26-2011, 12:17 PM
By leopard-user1 in forum OS X - Operating SystemReplies: 0Last Post: 10-26-2009, 06:18 PM
By Xes in forum OS X - Apps and GamesReplies: 1Last Post: 07-22-2009, 08:04 AM
By rdr07 in forum OS X - Operating SystemReplies: 1Last Post: 06-12-2005, 04:42 AM