ZFS Questions - Moving from old school ext4 install

Dunuin

Famous Member
Jun 30, 2020
8,924
2,281
156
Germany
You usually don't need to mount ZFS datasets with fstab.

Are you sure you used the correct mountpoint? In the screenshot you used "/data1/storage" as path for the directory storage but earlier you showed the output of zfs get compression where no dataset "storage" on the pool "data1" existed.
Or is "storage" just a folder inside your pools root and not a proper dataset? In that case you would need to use pvesm set data1-storage --is_mountpoint /data1 as then "/data1" would be the mountpoint and "storage" would just be a subfolder of it.
 
Last edited:

Stacker

Member
May 6, 2020
22
0
6
You usually don't need to mount ZFS datasets with fstab.

Are you sure you used the correct mountpoint? In the screenshot you used "/data1/storage" as path for the directory storage but earlier you showed the output of zfs get compression where no dataset "storage" on the pool "data1" existed.
Or is "storage" just a folder inside your pools root and not a proper dataset? In that case you would need to use pvesm set data1-storage --is_mountpoint /data1 as then "/data1" would be the mountpoint and "storage" would just be a subfolder of it.
I made a directory called "storage" via ssh under /data1/ ... so it be /data1/storage ... I then created that directory at the data-center level and gave it the /data1/storage path... and limited it to that node . Thats the only way I could make it because if i try to make directoy under the node its looking for a drive and there is no free drive. Do I still need to do this mount command?
 

Dunuin

Famous Member
Jun 30, 2020
8,924
2,281
156
Germany
No, then you could either...
A.) continue working with that directory and use pvesm set data1-storage --is_mountpoint /data1 or
B.) create a dataset and use that instead of a folder: zfs create data1/storage
 

Stacker

Member
May 6, 2020
22
0
6
No, then you could either...
A.) continue working with that directory and use pvesm set data1-storage --is_mountpoint /data1 or
B.) create a dataset and use that instead of a folder: zfs create data1/storage
I went with Option A unless its a bad idea... Sent my results.. seems to take it and work ok.
 

Attachments

  • data-dir-result.PNG
    data-dir-result.PNG
    105.6 KB · Views: 2

Dunuin

Famous Member
Jun 30, 2020
8,924
2,281
156
Germany
Both will work. I would have gone with option B, because it makes it easier to manage. Each dataset is its own filesystem (so think of it like a ext4 partition), you can snapshot each dataset individually, set options for each dataset (like choosing another compression algorithm), easier monitor its size, set its own quota, encrypt it, replicate it, ... all stuff that you can't do individually with a folder.
 
Last edited:

Stacker

Member
May 6, 2020
22
0
6
Both will work. I would have gone with option B, because it makes it easier to manage. Each dataset is its own filesystem (so think of it like a ext4 partition), you can snapshot each dataset individually, set options for each dataset (like choosing another compression algorithm), easier monitor its size, set its own quota, encrypt it, replicate it, ... all stuff that you can't do individually with a folder.
Did i put the quota on right for rpool or should I put it on every one of them?
 

Dunuin

Famous Member
Jun 30, 2020
8,924
2,281
156
Germany
That quota was for the entire pool. But I for example usually organize my stuff in different datasets. For example one dataset just to store ISOs, one for backups, one for VMs, one for temporary files, ...
ISOs for example are often very well compressible and I don't access them that often, so I want that dataset to be compressed using the slower but more effective zstd compression. My backups are already compressed on file-level, so I don't need block-level compression at all and will deactivate it. You can't do such things when just using folders for your ISOs, backups and so on. If everything is just a folder in your pools root, then everything will be compressed with the same compression algorithm and you can't decide what should be compressed with what algorithm. So I always try to group similar stuff in datasets.
You don't have to set a quota for every dataset, the pool-wide quota still appied and will prevent that you completely fill up your pool until it crashes.
But at least you get the option to set individual quotas.
 
Last edited:
  • Like
Reactions: Stacker

Stacker

Member
May 6, 2020
22
0
6
OK so I might have a problem... and that is USER quotas. I learned that LXC and ZFS cant do user quotas ok so not to big of deal... Will KVM allow this? I have a server that I wanted to merge into this new box that is running a panel with many sites... ara quoatas not not possible? If not then I have a lot to undo and move back to LVM. ZFS is not ready for production use cases.
 

Stacker

Member
May 6, 2020
22
0
6
ZFS got user and group quotas:
https://docs.oracle.com/cd/E19253-01/819-5461/gitfx/index.html
https://openzfs.github.io/openzfs-docs/man/7/zfsprops.7.html#userquota@

The question is more how PVE handles them with user/group remapping of unprivileged LXCs and so on.
This seems to be a quota at the host level for a VM itself. What about quoats inside a VM for a Cpanel user as example. The VM might have 1TB but the cpanel user gets 50GB.

I guess my question is... Is there a one time setup on the Host Node level to the VM?

What would I need to do to let Cpanel or CWP have working quotas. This was easy back in the ovz days with 2nd level quotas.
 
Last edited:

Dunuin

Famous Member
Jun 30, 2020
8,924
2,281
156
Germany
This seems to be a quota at the host level for a VM itself. What about quoats inside a VM for a Cpanel user as example. The VM might have 1TB but the cpanel user gets 50GB.

I guess my question is... Is there a one time setup on the Host Node level to the VM?

What would I need to do to let Cpanel or CWP have working quotas. This was easy back in the ovz days with 2nd level quotas.
PVE doesn't really care what happens inside the VM. It just provides a zvol block device and your guest OS has to handle everything storage related.
Without access to any ZFS features.
 

Stacker

Member
May 6, 2020
22
0
6
PVE doesn't really care what happens inside the VM. It just provides a zvol block device and your guest OS has to handle everything storage related.
Without access to any ZFS features.
So are you saying a Cpanel based Full KVM VM quotas will work per account on Cpanel?
 

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 your own in 60 seconds.

Buy now!