Frage

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.

War es hilfreich?

Lösung 2

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.

Andere Tipps

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:

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top