[lug] RAM based files, file systems

D. Stimits stimits at comcast.net
Wed Jan 28 01:57:15 MST 2004


Hugh Brown wrote:

> On Tue, 2004-01-27 at 23:31, D. Stimits wrote:
>
> >Steve Sullivan wrote:
> >
> >
> >>Is it possible to create files, or file systems,
> >>that exist only in RAM?  Long ago Solaris supported
> >>such a feature, but I don't find it in Linux.
> >>
> >>Kind of like /proc, but where users can write small temp files
> >>for better performance.
> >
> >Just use the loopback device. If you check up on how to view an iso9660
> >file (not cd rom), such as created with mkisofs, then you also know how
> >to create and make filesystems with virtually any filesystem type in
> >ram. Whether something might get swapped out is another story. In
> >essense a loopback device can be made to look like any filesystem type,
> >and formatted, written, read, and mounted/umounted.
> >
> >D. Stimits, stimits AT comcast DOT net
> >
> >
>
>
> is it really done in ram or is it done in a file?  e.g. I assume I can
> use dd to create a 512MB file, mount it via the loopback device and then
> format it.  When I write to the loopback mounted file, aren't I making
> changes to the original file on disk?

Either way. The ram disk people have mentioned has to be formatted and 
mounted. To do this it would go through loopback. Honestly though I 
don't know the details of creating a ramdisk, other than needing kernel 
support. The way to do it is almost certainly listed (minimally) in the 
kernel docs since a kernel feature is required.

D. Stimits, stimits AT comcast DOT net




More information about the LUG mailing list