On the topic of Linux RAM Disks.

2373

On my primary blog I have just finished posting an entry on my latest article to be published in the 4/2009 issue of Linux+ Magazine, The Linux RAM Disk. My last article written for the same periodical has just hit the news stands earlier this month (issue 3/2009, Linux Storage Management).

While on the topic of RAM disks, I wish to share the following from the same post:

While not part of the original article I also decided to write a generic RAM disk block device module which can be written to/formatted and mounted like a normal Linux block device. Note that you can download a *.tar.gz file containing the source code and Makefile here (included is a README with basic instructions for compilation and initialization). This exercise was an excellent learning experience on how Linux block devices functions.

The block device driver is limited to a size of 64MB and can be altered within the source file rxd.c. You can write to the physical device node /dev/rxdev or write an ext2 file system and mount it locally where you can read/write files to it. All files will remain on the RAM disk until the module is removed.