how do i create a ram disk in Fedora 16
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink how do i create a ram disk in Fedora 16

    how do i create a ram disk in Fedora 16 please provide complete noob instructions since im a noob at this i did a search for ram disk in 16 i did not find anyi am planning on making a 10 - 12 gb ram disk


    thank you very much.
    windows 8 / fedora 17

  2. #2
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    8,151
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    Quote Originally Posted by DemonGodKid
    how do i create a ram disk in Fedora 16 please provide complete noob instructions since im a noob at this i did a search for ram disk in 16 i did not find anyi am planning on making a 10 - 12 gb ram disk


    thank you very much.
    1) this makes the mount point for the ramdisk (can be anywhere that satisfies ownership), you can name it whatever
    you want, but it just needs to match the mount point name at the end of the step #2 command

    mkdir -p /mnt/myramdisk

    2) make the ram disk

    mount -t tmpfs -o size=10G tmpfs /mnt/myramdisk

    to try that out I did the above and was surprised you can copy files right to the tmpfs without formatting a file system there, it just works.
    I copied a pdf file to mine and loaded it into okular just fine as is.
    Last edited by marko; 14th November 2011 at 04:26 AM.

  3. #3
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    thank you very much ur awesome!
    windows 8 / fedora 17

  4. #4
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    8,151
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    You realize that's just a one shot thing? If you reboot it's gone. If you want the ramdisk recreated each boot, it's pretty easy to add the equivalent of step #2 to /etc/fstab

  5. #5
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    yep i understand is there a way to save it? to update drive when ram disk is updated?
    windows 8 / fedora 17

  6. #6
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    8,151
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    You could use rsync to load up the ramdisk at boot up out of a tree of directories and files and use it to read out the ramdisk back to a copy you save off when the machine is powered down. But it would take some scripting to do that, have the script mount the tmpfs mount point (instead of from /etc/fstab) and then use rsync to copy the files out of some save directory and into the ramdisk

    make a boot up script "/etc/rc.d/rc.local", set it as executable and so it contains
    Code:
    #!/bin/bash
    #
    #   /etc/rc.d/rc.local
    
    mount -t tmpfs -o size=10G tmpfs /mnt/myramdisk
    rsync -a /var/saved_myramdisk  /mnt/myramdisk
    then activate the rc.local service:
    systemctl enable rc.local.service
    Shutting down would just need to do the opposite and rsync from the ramdisk and back to
    the saving directory:

    Add a script in the directory /lib/systemd/system-shutdown/
    (for example, /lib/systemd/system-shutdown/saveramdisk and set executable )
    Code:
    #!/bin/bash
    #
    #  /lib/systemd/system-shutdown/saveramdisk
    #
    
    rsync -a /mnt/myramdisk  /var/saved_myramdisk
    Last edited by marko; 25th February 2012 at 08:04 AM.

  7. #7
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    how do i unmount said ram disk

    ---------- Post added at 05:31 PM ---------- Previous post was at 05:12 PM ----------

    how would i have the ramdisk save to lets say ever hour save to a different HDD 1 next hour HDD2 next hour HDD3 and HDD1 and or keep adding to a new HDD untill end of HDD and start at HDD1 again?
    windows 8 / fedora 17

  8. #8
    Join Date
    Feb 2012
    Location
    coimbatore
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    What can you do if you create Ramdisk in Fedora?

  9. #9
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i create a ram disk in Fedora 16

    super fast access to your files and if you want to run a game from ram such as Rage you wont have the textures suddenly apear at the side of your screen there are many uses i like to load files and programs into my ram and run them with fluidness

    a cheap fx 8 core amd with 32 gb of ram mother board and powersupply only costs 800$ would be all most people need from newegg.com
    windows 8 / fedora 17

Similar Threads

  1. I am unable to create a boot disk under Fedora 13
    By mdawoodm in forum Using Fedora
    Replies: 4
    Last Post: 15th July 2010, 11:10 PM
  2. How to create RAW disk device in Fedora 12
    By fedora12user in forum Using Fedora
    Replies: 5
    Last Post: 4th March 2010, 02:09 PM
  3. Create a bootable USB disk of install Fedora DVD
    By zmdmw52 in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 8th September 2009, 08:04 AM

Tags for this Thread

Posting Permissions

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