[SOLVED] answer.toml: disk-setup doesn't work when using --fetch-from iso

proxmix

New Member
Nov 23, 2023
19
4
3
Dear PVE-8.2-1-Experts,

setting these values during graphical installation

Target Harddisk: /dev/vda (256.00GiB)
  • Filesystem: ext4
  • hdsize: 256.00 GB
  • swapsize: 8 GB
  • maxroot: 64GB
  • minfree: 32 GB
  • maxvz: blank (<-- means left untouched)

results in these (correct) disk/partition sizes:

Bash:
root@pve01:~# vgdisplay
  --- Volume group ---
  VG Name               pve
  VG Size               <255.00 GiB
  PE Size               4.00 MiB
  Total PE              65279
  Alloc PE / Size       57086 / 222.99 GiB
  Free  PE / Size       8193 / 32.00 GiB        #<- fine, as specified!


root@pve01:~# lvdisplay
  --- Logical volume ---
  LV Name                data
  VG Name                pve
  LV Size                <147.98 GiB     #<- fine, as specified/calculated


  --- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV Size                8.00 GiB     #<- fine, as specified!


  --- Logical volume ---
  LV Path                /dev/pve/root
  LV Name                root
  VG Name                pve
  LV Size                64.00 GiB    #<- fine, as specified!

So far so good.

Using autoinstall, respectively this answer.toml to specify the same disk/partition sizes

Code:
[global]
keyboard = de
country = de
fqdn = pve01.example.com
mailto = pve01@example.cm
timezone = Europe/Berlin
root_password = "changeme"

[network]
source = "from-dhcp"

[disk-setup]
filesystem = "ext4"
lvm.hdsize = 256
lvm.swapsize = 8
lvm.maxroot = 64
lvm.minfree = 32
lvm.maxvz = 0
disk_list = ['vda']

to create an auto-install-iso using this command ...

Bash:
proxmox-auto-install-assistant prepare-iso proxmox-ve_8.2-1.iso --fetch-from iso --answer-file answer.toml

... after letting the auto-install-iso boot and run the specified disk/partition in answer.toml are not applied:

Bash:
root@pve01:~# vgdisplay
  --- Volume group ---
  VG Name               pve
  VG Size               <255.00 GiB
  PE Size               4.00 MiB
  Total PE              65279
  Alloc PE / Size       37310 / 145.74 GiB
  Free  PE / Size       27969 / 109.25 GiB     #<- ?!? expected 32 GB here.


root@pve01:~# lvdisplay
  --- Logical volume ---
  LV Name                data
  VG Name                pve
  LV Size                <62.00 GiB #<- ?!?


  --- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV Size                8.00 GiB   #<- seems to be ok


  --- Logical volume ---
  LV Path                /dev/pve/root
  LV Name                root
  VG Name                pve
  LV Size                <73.75 GiB    #<- ?!?

This is the command used to create to autoinstall iso was taken from https://pve.proxmox.com/wiki/Automated_Installation

What am I doing wrong?

Thank you very much for your advice.

Best regards,
proxmix
 
Last edited:
Hi,
are you sure you used the exact same answer file? Please note that setting maxvz=0 is not the same as leaving it blank. That should lead to no data LV to be created.
 
  • Like
Reactions: proxmix
Thank you very much for your feedback.

Honestly, I'm not sure anymore whether I've used the exact same settings - I've just rebooted too often the last days. ;-) But I can and will test it and give feedback later.
 
Oh oh, you are completely right! My fault. This answer.toml (leaving lvm.maxvz unset):

Code:
[disk-setup]
filesystem = "ext4"
lvm.hdsize = 256
lvm.swapsize = 8
lvm.maxroot = 64
lvm.minfree = 32
disk_list = ['vda']

works fine, too. Thank you very much again.
As I prefer using fetch-from-iso I'm very happy about your advice and the solution.
 
  • Like
Reactions: aaron
I finally got around to test the different scenarios.
The manual graphical installation was done with these disk settings:
Code:
hdsize: 120
swapsize: 8
maxroot: 30
minfree: 20
maxvz: [blank]

Then the first answer file, with only the necessary disk settings for LVM:
Code:
[disk-setup]
filesystem = "ext4"
lvm.swapsize = 8
lvm.maxroot = 30
lvm.minfree = 20
disk_list = ["sda"]

And then the third, resembling yours with hdsize and maxvz explicitly set:
Code:
[disk-setup]
filesystem = "ext4"
lvm.hdsize = 120
lvm.swapsize = 8
lvm.maxroot = 30
lvm.minfree = 20
lvm.maxvz = 0
disk_list = ["sda"]

To have the resulting sizes in a short form, I used the lsblk command. The results for all three variants are:

First, graphical:
Code:
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda                  8:0    0  120G  0 disk
├─sda1               8:1    0 1007K  0 part
├─sda2               8:2    0    1G  0 part /boot/efi
└─sda3               8:3    0  119G  0 part
  ├─pve-swap       252:0    0    8G  0 lvm  [SWAP]
  ├─pve-root       252:1    0   30G  0 lvm  /
  ├─pve-data_tmeta 252:2    0    1G  0 lvm
  │ └─pve-data     252:4    0   59G  0 lvm
  └─pve-data_tdata 252:3    0   59G  0 lvm
    └─pve-data     252:4    0   59G  0 lvm

Second, automated without hdsize or maxvz:
Code:
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda                  8:0    0  120G  0 disk
├─sda1               8:1    0 1007K  0 part
├─sda2               8:2    0    1G  0 part /boot/efi
└─sda3               8:3    0  119G  0 part
  ├─pve-swap       252:0    0    8G  0 lvm  [SWAP]
  ├─pve-root       252:1    0   30G  0 lvm  /
  ├─pve-data_tmeta 252:2    0    1G  0 lvm
  │ └─pve-data     252:4    0   59G  0 lvm
  └─pve-data_tdata 252:3    0   59G  0 lvm
    └─pve-data     252:4    0   59G  0 lvm

And the third, with hdsize and maxvz=0 set:
Code:
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda            8:0    0  120G  0 disk
├─sda1         8:1    0 1007K  0 part
├─sda2         8:2    0    1G  0 part /boot/efi
└─sda3         8:3    0  119G  0 part
  ├─pve-swap 252:0    0    8G  0 lvm  [SWAP]
  └─pve-root 252:1    0   30G  0 lvm  /

The first two variants are identical. While the third is missing the whole pve-data and its sub volumes for the thin pool, pve-data_tmeta and pve-data_tdata.
Root and swap are still the expected size.

So I cannot easily reproduce this here. Please check what settings you used, or if it is important enough for you, please try to reproduce it and let us know how so we can tackle this (potential) issue :)

EDIT: and it seems I was a bit late to the party. But wanted to leave it here nonetheless.
 
  • Like
Reactions: fiona
So I cannot easily reproduce this here. Please check what settings you used, or if it is important enough for you, please try to reproduce it and let us know how so we can tackle this (potential) issue
done (see above). Thank you, too for your help!
 
  • Like
Reactions: aaron

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!