Ramfs and how it works

I’w been using MineOS for a long time now, but i’w never tried the RamFS function with it, i wanted to give it a go since i’w noticed bottlenecks withing my raid array since minecraft isn’t the only thing running on it, but i do have 96gb ram in the system so im good there.

But im not sure i understand the way it’s suppose to work.
I followed this guid https://minecraft.codeemo.com/mineoswiki/index.php?title=Ramdisks
the guidew covers both Ramfs and tmpfs, but maby i need both? 'cus i did what it said when it comes to RamFS, i mounted the ramfs to /var/games/minecraft/servers and that worked fine, but since i know how ramfs works i also tested to create some files on the mount and reboot the computer, just as i would suspect the files where gone… do i use both ramfs and tmpfs? is that the point?
'cus obviously i need something to write the files from the ramfs to the disks aswell right?

I’m misunderstanding I think your intended meaning here. You suspected the files were gone, because that’s your understanding of ramdisks? Or you suspected the files were gone because it felt like it wasn’t set up properly?

Are you sure you want to use ramdisks/tmpfs? Because as I state in the wiki, their benefits no longer outweigh the costs of maintaining/understanding them.

Every reboot should warrant the disappearance of every file where a ramdisk was created; what is your understanding of the new workflow required to use ramdisks for Minecraft?

The files where gone, and i get why :slight_smile: thats how ram work and why would ramdisk be any different right? I get that, and im sorry for any confusion… I just thought that there would be some kind of system that writes the entire ramdisk to the drive from time to time while the server runs on the ram.

I guess thats what you meant by maintaining/understanding it :slight_smile: and i dont really NEED to use ramdisk, I’m just addicted to trying out new things ;-D

Thanks for the response though :slight_smile: I’ll reaserch the subject some more before i go through with it, if its as easy as copying the server to the ramdisk on boot, and periodically sync it back to the drive from time to time I’ll just write it on my own :slight_smile:

Keep up the good work!

No prob. The workflow you’re interested in replicating is this:

  1. system boots, bind mounts ramfs over /var/games/minecraft/servers
  2. examination of /var/games/minecraft/servers should show that it’s empty.
  3. you can populate the directory by taking existing copies of your world and putting it into the servers/ directory. This is most commonly done with restore points. Alternatively, it could be done with archives+import.
  4. the server now exists in servers/ which means it can be run.
  5. over time, you continue to make restore points & archives
  6. you play
  7. when the server crashes, or is shutdown normally–you expect servers/ to go empty. At this point, you’re reliant on how frequently you made restore points & archives.
  8. go back to step 1

I think by nature, this workflow actually requires an additional step to work in the webui. And that step is a revision to step #2: the name of the servers should exist in /var/games/minecraft/servers, or else it won’t show up in the webui, to restore in the first place.

I believe the way to handle this, then, is to actually start putting the restore actions in the system boot file, e.g., /etc/rc.local.

You’d do something to the effect of:

cd /usr/games/minecraft
./mineos_console.js -s SERVERNAME restore 0

thats a great idea ;D i was planing it all out in my head how to use rsync to set it all up but restores are even better imo :slight_smile: are there console commands to start the server aswell? that way i can make a script that restores and starts on rc.local

cd /usr/games/minecraft
./mineos_console.js -s SERVERNAME start

It works great :slight_smile: thanks for the help.

I have one last question though, i found how to remove restore points “older then” with rdiff, having such frequent backups makes a lot of restore points… But does it actually matter? Rdiff doesn’t really take up more space if there isn’t an actuall change in the files right?

Yes, that is correct.