Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Mounting RAM Disks as "-notremovable"
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="l008com" data-source="post: 1408052" data-attributes="member: 143198"><p>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.</p><p> </p><p>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.</p><p> </p><p>This is the command I used in 10.5 to create a 1 GB RAM disk at boot:</p><p>[code]/usr/sbin/diskutil erasevolume HFS+ "web-ram" `/usr/bin/hdiutil attach -notremovable -nomount ram://2200000`[/code]</p><p> </p><p>Note the "notremovable", that flag makes the system treat the mounted disk image (or in this case, the RAM disk), like a real physical disk, and not a mounted disk image. When you use this flag, the ram disk will actually show up with a regular hard drive icon. Without this flag, it shows up as a white disk image.</p><p> </p><p>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.</p><p></p><p>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.</p></blockquote><p></p>
[QUOTE="l008com, post: 1408052, member: 143198"] 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: [code]/usr/sbin/diskutil erasevolume HFS+ "web-ram" `/usr/bin/hdiutil attach -notremovable -nomount ram://2200000`[/code] Note the "notremovable", that flag makes the system treat the mounted disk image (or in this case, the RAM disk), like a real physical disk, and not a mounted disk image. When you use this flag, the ram disk will actually show up with a regular hard drive icon. Without this flag, it shows up as a white disk image. 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. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Mounting RAM Disks as "-notremovable"
Top