I’m setting up a new home server on a Lenovo M910q with a 500G SSD and a 1T NVME (I’ll expand in the future). I’d like to run all software from the SSD and store files/data from the NVME. I’ve got Proxmox setup and added LVM storage to my SSD and ZFS storage to the NVME. In the Proxmox GUI, everything is looking great.

Next I’ve created a VM using the latest Debian ISO and added 40G of the LVM and 500G of the NFS storage to the VM. Everything is working well there, except that when I run LSBLK I’ve seeing the disk and partitions of the LVM (listed as ‘sda’), but only the disk (no partitions) of the ZFS (listed as ‘sdb’).

This is my first time working with ZFS, so I’m not sure how this is supposed to work. Do I need to use fdisk inside the VM to create another ZFS partition under ‘sdb’, or is there something I should be doing in Proxmox to make the ZFS partition visible inside the VM?

VM hardware:

Checking LSBLK inside the running VM:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   40G  0 disk 
├─sda1   8:1    0 37.9G  0 part /
├─sda2   8:2    0    1K  0 part 
└─sda5   8:5    0  2.1G  0 part [SWAP]
sdb      8:16   0  500G  0 disk
  • Shadow@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    27 days ago

    You’ve made a virtual disk on the zfs. The vm will never see the zfs, that’s managed entirely by the host.

    Yes you’ll want to make a normal partition inside that virtual disk.

    With vms you can’t just access the host zfs, it’s always abstracted. If you use lxc containers on proxmox then you can bind the zfs into the container (google it for steps, it’s not in the Gui)

  • ikidd@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    27 days ago

    If you do a zfs list from the Proxmox server command line, you’ll now see a dataset named something like rpool/vm100-data-disk1 and that the second virtual disk in your VM. Now you operate on the virtualdisk however you like, format it with EXT4 or something (don’t use ZFS). It’s still a ZFS volume and Proxmox will be able to snapshot it, replicate it etc, or you could do it manually on the host. But as far as the VM is concerned, it’s a raw disk that you do normal disk stuff with.