How to change the default ZFS rpool dataset layout

jojoii

New Member
Mar 16, 2022
3
0
1
42
Hey there,

although I'm fairly new with Proxmox, I do have some ZFS/Linux background.

I was wondering whether there is a way to change the default ZFS rpool dataset layout:
root@proxmox:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 1.64G 76.8G 104K /rpool
rpool/ROOT 1.58G 76.8G 96K /rpool/ROOT
rpool/ROOT/pve-1 1.58G 76.8G 1.58G /
rpool/data 96K 76.8G 96K /rpool/data

What if I want to have a separate dataset for e.g. /var/log, /home or /usr? It's just that historically, I was used to separate specific directories into separate partitions (size limits, security, ease of migration, etc).

I noticed the Proxmox installation GUI does allow me to change the size of rpool, ashift, compression I believe and few others, but that's it. It won't allow me to specify what datasets to create nor where to mount them.

So:
  1. Is there an easy way how to get more granularity on the OS dataset layout, or do I need to do it the hard way:
    1. install Proxmox
    2. reboot to live USB
    3. create new datasets (e.g. rpool/var) with a new mountpoint (e.g. /rpool/var)
    4. move the files from old /var to new /var
    5. reboot
  2. Is this even a good idea with Proxmox? Any thought on why should/must I NOT do it? I'm open-minded. If you give me a good reason why not, I'm open to change my mind. Even now I'm not sure I want it to do it this way, I tend to trust the "defaults" settings.
If I haven't mentioned it, this is purely for the OS pool. I have 2 dedicated SSDs for the OS itself and another 10 spinning SATA drives for additional ZFS pool dedicated to VMs itself.

Thank you guys.
 
What if I want to have a separate dataset for e.g. /var/log, /home or /usr? It's just that historically, I was used to separate specific directories into separate partitions (size limits, security, ease of migration, etc).
Just do it. Best to use single user mode for that. You may want to set overlay=on.
 

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!