Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I create a true RAM disk? I don't want a virtual file system with loop devices, I would like a mountable filesystem that is stored completely in RAM.
I am using Fedora 17, linux 3.6.9-2.fc17.i686
Thanks in advance.

share|improve this question
1  
The real ramdisk is deprecated since it uses a fixed allocation, unlike ramfs and tmpfs. linuxfordevices.com/c/a/Linux-For-Devices-Articles/… –  sawdust Dec 7 '12 at 3:10

2 Answers 2

up vote 2 down vote accepted

See the man page for more details.

Step 1:

mkdir -p /mnt/[some-name-or-other]

Step 2:

mount -t tmpfs -o size=1G tmpfs /mnt/[some-name-or-other]

Step 3:

Enjoy!

share|improve this answer

tmpfs should do the trick.

# mount -t tmpfs tmpfs /path/to/mount/point

# df -h
[...]
tmpfs                            12G     0   12G   0% /home/gert/tmpfs

It limits to 50% of your total RAM available by default (configurable - see 'Mount options for tmpfs' in the manpage mount(8)).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.