ramdrive

Matus

Active Member
Mar 31, 2017
28
0
41
66
Hello,

I have created ramdrive for proxy cache with this commands:
>modprobe brd rd_size=5200000
>pvcreate /dev/ram0
>vgcreate vgramdisk /dev/ram0
>lvcreate -L 4G -n ramstorage vgramdisk
>mkfs.ext2 /dev/vgramdisk/ramstorage
>mount -o noatime /dev/vgramdisk/ramstorage /mnt/ramstorage
Then I create directory storage and mountpoint to container.
It works very well.

Now we need to automate this on starting of system.
Could you advise me best practise for this in Proxmox?

Thanks
 
If your goal is just to have a directory stored directly in RAM, the better option would be a tmpfs. I.e. mount -o size=5G -t tmpfs none /mnt/ramstorage. This is just a mount then, so you can put it in /etc/fstab to make it persistent.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!