Thursday, August 2, 2012

Configure ramdisk for Openfiler


Create a new file under /etc/bootloader.d directory. In this new file, type add_options ramdisk_size=32000. Please note that the unit is in kilobytes. The example below shows the new file is called ramdisk.conf and the content of this file.

[root@abc ~]# cd /etc/bootloader.d
[root@abc bootloader.d]# ls
distro-defaults.conf  plymouth-bootloader.conf  ramdisk.conf  syslinux_bg.png
[root@abc bootloader.d]# more ramdisk.conf
add_options ramdisk_size=32000


After the file is created, type bootman to apply the configuration as shown below

[root@abc ~]#bootman


Restart your machine and you can check whether is it successful by typing cat /proc/cmdline as shown below:

[root@abc ~]# cat /proc/cmdline
mce=dont_decode cciss.cciss_allow_any=1 splash quiet ramdisk_size=32000 ro root=LABEL=/ initrd=/initrd-2.6.32-71.18.1.el6-0.20.smp.gcc4.1.x86_64.img BOOT_IMAGE=/vmlinuz-2.6.32-71.18.1.el6-0.20.smp.gcc4.1.x86_64


Create a filesystem on /dev/ram0 and mount it up and you will have a 32MB ramdisk.

No comments: