RAM can be used as a temporary storage in FreeBSD and performance wise it is much faster than your traditional hard drives . Since it is a volatile memory , this storage won’t sustain a shutodwon or a sudden power drop on your system . In production enviornment, you might need this temporary RAM disk to dump temporay data without interrupting the actual drives for eg: FreeBSD based routing equipments or firewalls .
Create the mount point :
mkdir /diskmnt
Mount ram disk to the mount point , you can specify the size of the disk , I used only 100 MB here .
/sbin/mdmfs -M -S -o async -s 100m md5 /diskmnt
You can vrify by :
df -h
To remove the disk:
umount /diskmnt
You need to release the RAM resource if you are not using it :
mdconfig -d -u 5
You can make the disk permanent by adding the entry in the fstab:
Leave a Reply