Creating a ramdisk in Solaris 10

Creating a 40m ramdisk

bash-3.00# ramdiskadm -a ramdisk_rrd 40m
/dev/ramdisk/ramdisk_rrd

Checking ramdisk file system

bash-3.00# fstyp /dev/ramdisk/ramdisk_rrd
Unknown_fstyp (no matches)

Creating filesystem on ramdisk

bash-3.00# newfs /dev/ramdisk/ramdisk_rrd
newfs: construct a new file system /dev/rramdisk/ramdisk_rrd: (y/n)? y
/dev/rramdisk/ramdisk_rrd:      81872 sectors in 136 cylinders of 1 tracks, 602 sectors
40.0MB in 9 cyl groups (16 c/g, 4.70MB/g, 2240 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 9664, 19296, 28928, 38560, 48192, 57824, 67456, 77088,

Make mount path

bash-3.00# mkdir /ramdisk_rdd

Mounting ramdisk

bash-3.00# mount /dev/ramdisk/ramdisk_rrd /ramdisk_rrd

bash-3.00# df -h /ramdisk_rrd
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/ramdisk/ramdisk_rrd
37M   1.0M        33M     4%    /ramdisk_rrd
NOTE: When you reboot the server this disk will disappear! Worth taking a look atthe following wiki page from sun which has scripts to automate this

http://wikis.sun.com/display/BigAdmin/A+script+to+start+and+stop+ramdisks+in+the+Solaris+OS#AscripttostartandstopramdisksintheSolarisOS-Astart%2FstopscriptforramdisksintheSolarisOS

Share