2

Basically, what I want to do is this (in a psuedo bash-ish code)

#create ramdisk raid
diskutil erasevolume HFS+ "r1" `hdiutil attach -nomount ram://4661720`;
diskutil erasevolume HFS+ "r2" `hdiutil attach -nomount ram://4661720`;
diskutil createRAID stripe SpeedDisk HFS+ /Volumes/r1 /Volumes/r2;

#copy minecraft server files to ramdisk
cp minecraft_Server /Volumes/SpeedDisk

#start minecraft_server
cd /Volumes/SpeedDisk/minecraft_server
java -Xms2G -Xmx2G -jar minecraft_server.jar nogui

#once I stop the server, copy the files to my harddrive
cd ~
cp /Volumes/SpeedDisk/minecraft_server minecraft_server/

I'm not sure about how to do this ^ in real life :p I was considering using python but it seems like there are problems with os.system for copying files.

Also, I would like to know if there is a way for me to eject the ramdisks when I am done. This is all going to be done in Mac OS X Leopard. The reason I'm doing all of this is to speed up my minecraft server a bit without buying an SSD.

Broseph
  • 1,655
  • 1
  • 18
  • 38

2 Answers2

2

I was considering using python but it seems like there are problems with os.system for copying files.

...then use the right tool for the job:

johnsyweb
  • 136,902
  • 23
  • 188
  • 247
1

Shell scripting seems to be the best solution for this kind of problem ( assuming that you want this to work on a single platform mac osx ). Write a shell script with these commands and use that script everytime you want to execute these commands.

MoveFast
  • 3,011
  • 2
  • 27
  • 53
  • Do you know how to auto eject the ramdisks afterwards? – Broseph Feb 17 '13 at 05:10
  • It is all right for waiting for Java Server to end. Technically shell script process will spawn as child process(Java Process) and wait for it to end before proceeding forward which is perfectly all right (if this is the behavior you are looking for). – MoveFast Feb 17 '13 at 05:13