Help understanding ZFS

Blaarg987

New Member
Jan 3, 2025
3
0
1
Hello everyone, sorry if this is a stupid question but I am quite new to ZFS. I am trying to understand how it fits into the file system of Proxmox and also how VMs & Containers can use it.

I have a ZFS pool of 3 HDD's that are 4TB each, I have a ZFS created from that pool called NAS, which I mounted in a container to be my SMB NAS share. So I understand that I have the pool, but the ZFS structure is what confuses me. Here is a screenshot of the output of the zfs list command and zpool list command. Could someone explain this structure to me, and how VM/LXC containers can use these? I think the subvolumes are confusing me quite a bit, wouldn't the ZFS NAS be a regular directory like normal?

Again, I am quite new to this. The NAS share has been working quite well but I am trying to understand more of what's going on "under the hood".
 

Attachments

  • ZFS.png
    ZFS.png
    10.6 KB · Views: 9
Hi Blaarg987,

when you create a container using ZFS storage, the backend will use the `subvol` format for the container data [0]. So assuming your SMB NAS share container has the VMID 100, you should already be using the storage as intended. To verify, you could compare the the outputs of `df -h` and `du -sh /` from within your container to what you see from `zfs list` and `du -sh /NAS/subvol-100-disk-0` from your pve host. Be aware that these values will slightly vary, but overall should be in the same range.

`zpool list` will give you the information about the total raw storage you have assigned to your pool without the redundancy you have set up.

Not sure if I've answered your question, but I hope this information helps!

Best regards,
Daniel

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_features_6
 
Because of the size of your pool it seems you created a 3-way strip set pool (RAID 0). Was that intentional?
If one of your HDDs get problems you will lose all data of the whole pool!
Code:
zpool status
will give us the info we need.
 
  • Like
Reactions: Johannes S