Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

grub.conf

title CentOS (2.6.36.4)
    root (hd0,0)
    kernel /vmlinuz-2.6.36.4 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
1  
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

2 Answers 2

up vote 1 down vote accepted

See http://superuser.com/questions/255060/how-can-i-change-the-amount-and-size-of-linux-ramdisks-dev-ram0-dev-ram15

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

 
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.