How to create ramdrive linux

Sometimes OPS need RAM drives.

I use one for nginx cache at my CDN servers

mount -t tmpfs -o size=sizeM tmpfs /mnt/ramdrive/

Add required lines to PH host fstab and to LXC fstab

tmpfs /mnt/ramdrive tmpfs size=2000M,mode=0777

How to resize ram drive:

mount -o remount,size=new-sizeM /mnt/ramdrive/

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>