Results 1 to 25 of 595

Thread: The Linux Help and Tutorial Thread

Threaded View

  1. #11
    Xtreme Cruncher
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    4,162
    Quote Originally Posted by Gamekiller View Post
    Virtual Ramdisk... oh how you elude me. Though, creating the ramdisk isn't really the main issue. I'm wanting to run an application (java game server) from my ram in the form of a ramdisk (of course). It seems I could either add the directory to my /etc/fstab file or just drag the folder into my /dev/shm directory. Issue is, assuming one of the two is right (no idea... been doing a few hours of Googling... it's 6:30am /drool).. anyways issue is that being a server it will need to remember the changes done to "world" done by the clients accessing the server so I'd need to back the ramdisk up to the HDD on a set interval. Right? No idea how this all works.

    I'd like to have a ramdisk (200MB max size) that can dump to HDD every 5 minutes and also load from the HDD on boot (same dir that it's dumping/updating to on the HDD)

    Sorry if this isn't super clear. I'm so tired that my sight has blurred. Reason for the ramdisk is for my Minecraft server which deals with a ton of tiny little files (thousands?) while running. The "world" or map is the part with all of the small files and it's constantly changing and being accessed.

    Thanks!
    Sorry so slow to answer, health issues.

    Unless someone has a more elegant solution I would write a script to copy the files to a backup directory on the hard drive. Run the script from crontab every 5 minutes. Then use a startup or init script to copy the files from the hard drive to the ram drive on startup/bootup. Make sure startup script is run after ram drive is mounted.

    Example:
    #!/bin/bash
    cp /dev/ramdisk/gameserver/* /opt/gameserver/backup/

    Make executable and add script name to /etc/crontab and set to execute every 5 minutes. Make sure all directories exist and are correct. Execute by hand to see if any errors.


    Hope this helps.
    Last edited by PoppaGeek; 12-02-2010 at 04:48 PM.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •