Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to crete a ramdisk of 2gb in centOS 6.2 and the error I get is the following. Any help would be greatly appreciated.

[root@ssb1 ~]# mkfs -q /dev/ram0 2147483648
 mkfs.ext2: Filesystem larger than apparent device size.
 Proceed anyway? (y,n)


title CentOS (
    root (hd0,0)
    kernel /vmlinuz- ro root=UUID=be58af32-27ac-45fe-8341-715df43497ac rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet raid=noautodetect elevator=noop ramdisk_size=2147483648

Memory info

[root@ssb1 ~]# free
             total       used       free     shared    buffers     cached
Mem:      49455672    3185524   46270148          0      18228     164792
-/+ buffers/cache:    3002504   46453168
Swap:            0          0          0
share|improve this question
How much RAM do you have in your machine, and how large is the RAMdisk going to be? – Frederik Nielsen Jul 10 '12 at 12:54
Why not use the built-in support for dynamic ramdisks? – Ignacio Vazquez-Abrams Jul 10 '12 at 13:09
I'm not totally familiar with the built in ramdisk but I'll look into it. Thanks. I'm building this for an appliance and the OS lives on a CF card I want to minimize writes to the card by logging system and our own logs and tmp files to ram. – egorgry Jul 10 '12 at 14:05
Wow, old skool. tmpfs has totally eaten the old ramdisk model for lunch. – womble Jul 10 '12 at 17:07
I'm trying to keep it real. :) Haven't had a moment today it look at tmpfs. I see it's already mounted on centOS /dev/shm. – egorgry Jul 10 '12 at 18:33
up vote 1 down vote accepted


In particular,

mount -t tmpfs -o size=10g none /mnt/point
share|improve this answer
killed the legacy configuration left over from fedora 8 install and went with tmpfs. Thanks. – egorgry Jul 16 '12 at 16:36

Is this a 32 bit OS or a 64 bit OS?

It looks like you are using 3GB of RAM already and creating a 2GB RAM disk would put you over that magic 4GB mark that 32 bit systems can't handle.

share|improve this answer
this is a 64bit install. – egorgry Jul 10 '12 at 14:10

Your Answer


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.