Adding storage to a vm : best practices

lxiosjao

Member
Mar 21, 2021
63
1
13
Hello,

I would like to have a VM with docker for my personnal services.
Guest :
- TrueNasCore
or
- OpenMediaVault

Question
I would like to know what is the best way to add storage on the VM with proxmox.

Situation
All my VMs are based on a linux kernel.
I currently have :
- Host 1 (proxmox): zfs pool (8TB)
- Host 2 (PBS on an other NAS) : zfs pool (8TB) for my backup

Is it better to :
1) adding virtual storage with VirtIO SCSI ?
2) passthrough a physical disk to the VM ?

3) sharing storage from the host with NFS ?

1) adding virtual storage with VirtIO SCSI
I think using VirtIO SCSI is the most common way to do it.
And I feel more comfortable to manage my zfs pool from the host.

When I added the virtual disk for the storage on my VM.
Which filesystem am I supposed to use on the guest for this virtual storage ?
Ext4 or zfs ?
What about performance R/W ?

2) passthrough a physical disk to the vm
I can passthrough my sata controller only for 1 VM ... So I can't use my 8TB HDD storage on others VMs.
How am I supposed to do the backup of the storage with PBS if I choose this option ?

3) sharing storage from the host with NFS
How am I supposed to do the backup of the storage with PBS ?
What about performance R/W ?

What do you think ?
Thanks for your help
 
Last edited:
Hello,

I would like to have a VM with docker for my personnal services.
Guest :
- TrueNasCore
or
- OpenMediaVault

Question
I would like to know what is the best way to add storage on the VM with proxmox.

Situation
All my VMs are based on a linux kernel.
I currently have :
- Host 1 (proxmox): zfs pool (8TB)
- Host 2 (PBS on an other NAS) : zfs pool (8TB) for my backup

Is it better to :
1) adding virtual storage with VirtIO SCSI ?
2) passthrough a physical disk to the VM ?

3) sharing storage from the host with NFS ?

1) adding virtual storage with VirtIO SCSI
I think using VirtIO SCSI is the most common way to do it.
And I feel more comfortable to manage my zfs pool from the host.

When I added the virtual disk for the storage on my VM.
Which filesystem am I supposed to use on the guest for this virtual storage ?
Ext4 or zfs ?
What about performance R/W ?
That depends on what you are doing in detail. TrueNAS for example always wants direct access to disks and will always use ZFS. ZFS ontop of ZFS is very bad because overhead will increase exponentially. So if you got ZFS on your host that stores your virtual disks you don't want to use TrueNAS to create another ZFS pool using that virtual disks.
2) passthrough a physical disk to the vm
I can passthrough my sata controller only for 1 VM ... So I can't use my 8TB HDD storage on others VMs.
How am I supposed to do the backup of the storage with PBS if I choose this option ?
By using the proxmox-backup-client using the CLI from inside your linux based guest.
If you use TrueNAS as a NAS VM it would make sense to get another TrueNAS server for backups (that also could run your PBS as a VM). Then you could use ZFS replication to backup your pools between the TrueNAS VM and the bare metal TrueNAS server.
3) sharing storage from the host with NFS
In that case I would bind-mount the hosts datasets into a OMV LXC so OMV could share it using NFS so other VMs could access it.
 
Last edited:
  • Like
Reactions: lxiosjao

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!