How to solve the installation and future reinstallation of PVE

gusto

Well-Known Member
Feb 10, 2018
95
3
48
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: 10
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).