LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2008, 02:30 AM   #1
fmillion
Member
 
Registered: Nov 2006
Posts: 93

Rep: Reputation: 27
a better ramdisk solution?


Hey guys,
Is there a better solution for ramdisk block devices? Rebooting to change the size of /dev/ramXX seems inconvenient at best. Tmpfs isn't quite suitable for my project because I want to work with actual "real" filesystems (think creating a real FAT32 or ext3 filesystem on a block device". Is there any kind of kernel module or some sort of command to resize the kernel ramdisk block devices, or an alternative that will give me what I want? Sure I could use disk files but I want my data stored in RAM.
F
 
Old 05-30-2008, 03:55 AM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 45
I think that the best thing for you, is creating inside a tmpfs filesystem a file containing a disk image. And then, format this one as you want.
I sometime do like this, when I want to give a look at filesystems behaviour without formatting a disk.
You can make use of "dd" to create the disk image, e.g.
cd /tmp
dd if=/dev/zero of=sample.img bs=1048675 seek=256 count=0
creates a "sparse", 256Mb, disk image, that you can manage as you want.
 
Old 05-31-2008, 09:49 AM   #3
fmillion
Member
 
Registered: Nov 2006
Posts: 93

Original Poster
Rep: Reputation: 27
Thanks - that's an excellent solution! Never thought of doing it that way. What I did was make a file on a tmpfs filesystem then map it to a loopback device. Thanks again!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAMDISK: couldn't find valid ramdisk image starting at 0. iotc247 Slackware 10 12-10-2010 03:08 PM
Why use an enterprise software solution vesus a diy (home made) solution checkmate3001 Linux - Server 1 12-16-2007 02:24 PM
creating a ramdisk runtime from another ramdisk code123 Linux From Scratch 0 10-11-2004 08:59 AM
ramdisk clu Slackware 0 05-08-2003 02:25 AM
ramdisk brav012 Linux - Software 6 01-17-2002 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration