How to solve the installation and future reinstallation of PVE

gusto

Well-Known Member
Feb 10, 2018
101
3
58
25
I'm not an expert and I often use AI, but sometimes I get lost in AI too.
My situation is as follows.
I have 3 NVMe disks 1x 1TB and 2x 512GB.
I install proxmox (ext4) on the 1TB disk. Proxmox automatically divides the disk into root 100GB (swap 8GB) and lvm 850GB.

What is my goal?
I want only proxmox root to be on the 1TB disk.

I want to put the other 2 disks on a ZFS mirror and have everything else there, VM, CT, Backup, data.

Why?

If I reinstall proxmox (e.g. the 1TB disk fails), I install a new proxmox and everything else will be on a ZFS mirror. Otherwise, I import ZFS during the installation and edit /etc/pve/storage.cfg.

Is this solution correct?

AI prepared this procedure for me, but it doesn't work quite right. When I want to install CT or VM, I only have the choice of local storage.

I proceeded like this
Code:
sgdisk -Z /dev/nvme1n1
sgdisk -Z /dev/nvme2n1

zpool create -f xpool mirror /dev/nvme1n1 /dev/nvme2n1

zfs create -o mountpoint=/xpool/vm xpool/vm
zfs create -o mountpoint=/xpool/backup xpool/backup
zfs create -o mountpoint=/xpool/nextcloud xpool/nextcloud
zfs create -o mountpoint=/xpool/future xpool/future

zfs set quota=150G xpool/vm
zfs set quota=150G xpool/backup
zfs set quota=100G xpool/nextcloud


Dataset xpool/future no limit


nano /etc/pve/storage.cfg

# ZFS pool for VM/CT
zfspool: xpool
    pool xpool
    content images,rootdir
    nodes pve

# Directory for backups
dir: xpool-backup
    path /xpool/backup
    content backup
    nodes pve

# Directory pre Nextcloud
dir: xpool-nextcloud
    path /xpool/nextcloud
    content iso,backup,rootdir
    nodes pve

# Directory for future
dir: xpool-future
    path /xpool/future
    content iso,backup,rootdir
    nodes pve

When I want to install via GUI VM or CT, the GUI does not offer xpool, but only local-lvm.
 

Attachments

  • 111.png
    111.png
    30.4 KB · Views: 12
As you did zfs create -o mountpoint=/xpool/vm xpool/vm
then shouldn't it be

# ZFS pool for VM/CT
zfspool: xpool/vm
pool xpool/vm

or so? (I'm not sure for zfspool syntax in /etc/pve/storage.cfg).
 
Please is there any instructions on how I can install VM/CT on ZFS mirror in proxmox 9.
I try it via CLI, but also via Web GUI, but when installing VM/CT I can only select local storage
 
> I want only proxmox root to be on the 1TB disk.

>I want to put the other 2 disks on a ZFS mirror and have everything else there, VM, CT, Backup, data.

>If I reinstall proxmox (e.g. the 1TB disk fails), I install a new proxmox and everything else will be on a ZFS mirror. Otherwise, I import ZFS during the installation and edit /etc/pve/storage.cfg

AI has only succeeded in confusing the issue for you (and us.) Forget AI and just ask the experts.

When you install Proxmox, and you get to the "Target harddisk" part, go to Advanced Options and setup the ext4 root and lvm like you want. You want at least 50GB for ext4 rootfs, minimal swap 1-2GB, and can use lvm-thin for the rest.

After you reboot and pull up the web GUI, you can create a ZFS mirror on the 512G disks in Datacenter / Storage and go from there. Once you have the ZFS pool defined as Storage you should be able to use it as a target for virtual disks.
 
  • Like
Reactions: Johannes S
When you install Proxmox, and you get to the "Target harddisk" part, go to Advanced Options and setup the ext4 root and lvm like you want. You want at least 50GB for ext4 rootfs, minimal swap 1-2GB, and can use lvm-thin for the rest.
I would also use ZFS for the boot disc since it would give OP more flexiblity which part of the disk will be used for the OS and which one could be used for anything else. Instead of physical swap I would go with zramswap ( https://pve.proxmox.com/wiki/Zram#Alternative_Setup_using_zram-tools ).
Of course he won't get the auto-healing of ZFS but he will still get the other features.
 
Thank you
I usually google to read various articles, instructions, but I also ask a lot on internet forums.
AI is an improved google and it helped me a lot in the past. It even helped me now, but I misunderstood it.
When I created the VM via the GUI, I wanted the disk where the OS would be installed to be selected on the OS tab.
That was a big mistake, because the disk is selected only on the Disks tab.
Otherwise, everything is solved (at least as far as installing the OS on ZFS is concerned).

I use AI when I need to explain something, but now I needed to do something quickly. AI is a great thing, but I ignored it.

Of course I respect the experts who develop PVE and I often ask on the forum.

BTW I am currently installing VM and CT on a disk outside of root and I would like to create incremental backups.
In other words, I want to make a large backup of the OS and an incremental backup every day.
According to AI, it is not possible via GUI, but I can use the command
Code:
vzdump 101 --mode snapshot --storage backup --compress zstd --incremental true
However, I see this
Code:
Unknown option: incremental 400 unable to parse option vzdump {<vmid>} [OPTIONS]
AI says to use Proxmox Backup Server (PBS).
Question: Can I create incremental backups without PBS?
 

Attachments

  • proxmox02.png
    proxmox02.png
    31.1 KB · Views: 4
Last edited:
I would also use ZFS for the boot disc since it would give OP more flexiblity which part of the disk will be used for the OS and which one could be used for anything else. Instead of physical swap I would go with zramswap ( https://pve.proxmox.com/wiki/Zram#Alternative_Setup_using_zram-tools ).
Of course he won't get the auto-healing of ZFS but he will still get the other features.
Since I have a mini Aoostar GEM 10, where I have 3 NVMe slots, my goal is this.
Use one disk only for Proxmox boot (root).
I want to have everything else, VM, CT, backups, data separately on the other two disks (ZFS Mirror).
I really don't like updating the OS, for example, from Debian 12 to Debian 13. I'd rather install Debian 13 from scratch and transfer the configuration from Debian 12.
So my goal is also that if I move from PVE 9 to PVE 10 in the future, I want to install PVE from scratch.
And it will be important for me to keep VM, CT and backups (data) on two disks in ZFS mirror.
Is this idea bad?
Of course, I will have VM and CT backups on a separate NAS in addition to local storage
 
  • Like
Reactions: Johannes S