Using RAMdisk as test storage pool in PVE UI?

Asperanza1337

New Member
Jan 15, 2024
2
0
1
Hello there, I know this is an unusual request but I am doing it purely in a homelab environment to tinker and try things out. I have a server with 192Gb of RAM, so I wanted to create an 80Gb RAMdisk and use it as a storage volume for testing different VMs on.

I was able to successfully create and mount a tmpfs in CLI but I could not figure out how to make it visible in the PVE UI as a storage target. I then discovered the documentation for Zram (https://pve.proxmox.com/wiki/Zram) and successfully did that as well, I now have /dev/Zram0. I mounted it to both /mnt/pve/ramdisk and /tmp/ramdisk, but neither method surfaced the 80Gb on the UI. /dev/Zram0 does not appear under my list of disks on the node.

How do I proceed from here?
 
Hi,

initial disclaimer: please be aware that this is not a recommenced setup and you are on your own with possible issues arising from it!

You are of course free to play around with ram based storages, just be aware that they are not persistent.

I have a server with 192Gb of RAM, so I wanted to create an 80Gb RAMdisk and use it as a storage volume for testing different VMs on.
Be carefull to not overcommit your host.

I mounted it to both /mnt/pve/ramdisk and /tmp/ramdisk, but neither method surfaced the 80Gb on the UI. /dev/Zram0 does not appear under my list of disks on the node.
/dev/Zram0 is a block device, so in order to mount it you probably already created a filesystem on it. In that case, the easiest way is to create a directory storage on the host by using Datacenter > Storage> Add > Directory, and give the mountpoint of the zram disk as path.

Alternatively, you could manually create an LVM-Thin on the blockdevice and use that to create the storage in PVE via Datacenter > Storage> Add > LVM-Thin
 
Hi,

initial disclaimer: please be aware that this is not a recommenced setup and you are on your own with possible issues arising from it!

You are of course free to play around with ram based storages, just be aware that they are not persistent.


Be carefull to not overcommit your host.


/dev/Zram0 is a block device, so in order to mount it you probably already created a filesystem on it. In that case, the easiest way is to create a directory storage on the host by using Datacenter > Storage> Add > Directory, and give the mountpoint of the zram disk as path.

Alternatively, you could manually create an LVM-Thin on the blockdevice and use that to create the storage in PVE via Datacenter > Storage> Add > LVM-Thin
Thank you for the answer! I am aware of the issues with using RAM as storage, I am ok with them because I am doing this purely for alpha testing and proof of concept before I commit VMs to regular use.

I was able to create the directory storage no problem under the Datacenter, I did not look there initially because I was working under the assumption that it should have appeared in the Node's list of disks along with the rest of the /dev/sdX. I will have to do more reading on the different types/styles of storage in PVE because I am not sure the difference and use cases between Directory, ZFS, and LVM.
 

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!