LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Persistent ramdrive for Linux? (https://www.linuxquestions.org/questions/linux-software-2/persistent-ramdrive-for-linux-709809/)

dhave 03-07-2009 06:10 AM

Persistent ramdrive for Linux?
 
Does anyone know of an persistent ramdrive solution for Linux? I'd prefer free, open-source, but I'm willing to look into commercial solutions (or my boss is, that is).

I guess I could go with a script that would tar a ramdisk's data and store it on the hard drive, then restore it at the next boot, but I'm a little leery of this. I imagine a ready-made solution would do exactly the same thing, but I'd like to find out if somebody is developing and maintaining a project for a persistent ramdrive, I'd like to know.

Thanks.

michaelk 03-07-2009 08:51 AM

Have you checked out any howtos? I would not be leery, many distributions like puppy and knoppix do just that. In addition Puppy periodically writes to file too. I do not know of any ready-made solutions but it should not be difficult. In a nutshell add an entry in fstab and create a start up/shutdown script to restore/save data.

tmpfs makes it easy.
http://www.ibm.com/developerworks/library/l-fs3.html

TBC Cosmo 03-07-2009 08:52 AM

It would help to know what this is for. It seems to me that you would need to have non-volatile memory to use where the data actually does remain persistent. Otherwise, your alternative method is not a persistent ramdrive, rather a way to store data on a disk and copy it into a ramfs on boot.

Quote:

Currently Linux has no support for a persistent, non-volatile RAM-based filesystem, persistent meaning the filesystem survives a system reboot or power cycle intact. The existing RAM-based filesystems such as tmpfs and ramfs have no actual backing store but exist entirely in the page and buffer caches, hence the filesystem disappears after a system reboot or power cycle.
Protected and Persistent RAM Filesystem

dhave 03-07-2009 12:49 PM

Thanks, guys, for your help. I think I'll go with a script that writes data to and from tmpfs. I'm still looking for some good examples, so if you know of any, I'd be interested in seeing the links.

We use some custom apps that require frequent drive access, and we're running some older machines (this is a school application in a developing country). I thought I could speed things up with a ramdisk, but I wanted to make sure I could keep the data from session to session.

For a while I used a nifty commerical (though not expensive) ramdrive in Windows, and I was wondering if there could be anything like that for Linux. I'd like to reduce setup and configuration hassle as much as possible for the sake of endusers.

syg00 03-07-2009 07:41 PM

There used to be a thread on forums.gentoo for running the entire system from RAM.
Should have all the scripts to harden in-storage filesystems prior to shutdown as well as loading them into RAM on start-up.

dhave 03-08-2009 03:10 AM

Quote:

Originally Posted by syg00 (Post 3468234)
There used to be a thread on forums.gentoo for running the entire system from RAM.
Should have all the scripts to harden in-storage filesystems prior to shutdown as well as loading them into RAM on start-up.

Thanks for the info. I think this may be the Gentoo thread you referred to. It does have a lot of applicable info. There's also this, which is useful, but not as detailed.

I'll see if I can extract the specific info I need (good scripts for moving data back and forth from RAM to hd.

Thanks again.

syg00 03-08-2009 03:31 AM

Yep, they should cover things.

lazlow 03-08-2009 12:47 PM

dhave

Before you spend too much time on this, have you considered just installing one of the physical ram drives (they stay active as long as the computer has power)? Gigabyte has one model(4GB?) and IBM has several(much larger). They are fairly expensive for their size but they are very fast.

http://www.gigabyte.com.tw/Products/...ProductID=2180

http://www.hyperossystems.co.uk/


All times are GMT -5. The time now is 11:23 AM.