Setup-storage LVM parser issue
Nicolas Formichella
stigpro at outlook.fr
Tue Jul 9 09:43:29 CEST 2024
Hello Thomas and everyone,
Thanks for fixing the bootloop issue with 6.22, 6.23 seems to work fine now
However, I encountered a parser issue with setup storage :
```
disk_config nvme0n1 disklabel:gpt fstabkey:uuid bootable:1
p=ESP /boot/efi 512M vfat defaults
p=swap swap 16G swap sw
p=LVM - 4096- - -
disk_config lvm fstabkey:uuid
vg vg_internal nvme0n1p2
vg_internal_root / 128G ext4 rw
```
The above is my disk_config file, nearly copied from the manpage for setup-storage
However, it fails to parse the LVM block, both on the FAI process and on a standalone running of `classes="GEEK_PC_EFI" disklist="nvme0n1" setup-storage -f disk_config/GEEK_PC_EFI -d -s`
The error is :
```
Useless use of a constant ("mdadm not found in PATH\n") in void context at (eval 86) line 1587.
setup-storage is running in test-only mode
disklist: nvme0n1
Starting setup-storage 3.0
Using config file: disk_config/GEEK_PC_EFI
Input was:
disk_config nvme0n1 disklabel:gpt fstabkey:uuid bootable:1
p=ESP /boot/efi 512M vfat defaults
p=swap swap 16G swap sw
p=LVM - 4096- - -
disk_config LVM
vg vg_internal nvme0n1p2
vg_internal_root / 128G ext4 rw
ERROR (line 8): Invalid volume: Was expecting /^vg\s+/, or
/^raid([0156]|10)\s+/, or
/^btrfs\s+(single|raid([0156]|10))\s+/, or
/^(luks|luks:"[^"]+"|tmp|swap)\s+/, or /^tmpfs\s+/, or
/^nfs\s+([^\s]+)\s+/, or type
ERROR (line 8): Invalid line: Was expecting '\n' but found
"vg_internal_root / 128G ext4 rw" instead
Syntax error
```
Which makes little sense to me when looking at the man page, as I only want a single vg
I tried :
- Duplicating the existing VG
```
disk_config nvme0n1 disklabel:gpt fstabkey:uuid bootable:1
p=ESP /boot/efi 512M vfat defaults
p=swap swap 16G swap sw
p=LVM - 4096- - -
disk_config lvm fstabkey:uuid
vg vg_internal nvme0n1p2
vg vg_internal nvme0n1p2
vg_internal_root / 128G ext4 rw
```
Error :
```
Useless use of a constant ("mdadm not found in PATH\n") in void context at (eval 86) line 1587.
setup-storage is running in test-only mode
disklist: nvme0n1
Starting setup-storage 3.0
Using config file: disk_config/GEEK_PC_EFI
Input was:
disk_config nvme0n1 disklabel:gpt fstabkey:uuid bootable:1
p=ESP /boot/efi 512M vfat defaults
p=swap swap 16G swap sw
p=LVM - 4096- - -
disk_config lvm fstabkey:uuid
vg vg_internal nvme0n1p2
vg vg_internal nvme0n1p2
vg_internal_root / 128G ext4 rw
Volume group vg_internal has been defined already.
```
- Creating a secondary VG
```
disk_config nvme0n1 disklabel:gpt fstabkey:uuid bootable:1
p=ESP /boot/efi 512M vfat defaults
p=swap swap 16G swap sw
p=LVM - 4096- - -
disk_config lvm fstabkey:uuid
vg vg_internal nvme0n1p2
vg vg_internal2 nvme0n1p3
vg_internal_root / 128G ext4 rw
```
Error :
```
Useless use of a constant ("mdadm not found in PATH\n") in void context at (eval 86) line 1587.
setup-storage is running in test-only mode
disklist: nvme0n1
Starting setup-storage 3.0
Using config file: disk_config/GEEK_PC_EFI
Input was:
disk_config nvme0n1 disklabel:gpt fstabkey:uuid bootable:1
p=ESP /boot/efi 512M vfat defaults
p=swap swap 16G swap sw
p=LVM - 4096- - -
disk_config lvm fstabkey:uuid
vg vg_internal nvme0n1p2
vg vg_internal2 nvme0n1p2
vg_internal_root / 128G ext4 rw
ERROR (line 9): Invalid volume: Was expecting /^vg\s+/, or
/^raid([0156]|10)\s+/, or
/^btrfs\s+(single|raid([0156]|10))\s+/, or
/^(luks|luks:"[^"]+"|tmp|swap)\s+/, or /^tmpfs\s+/, or
/^nfs\s+([^\s]+)\s+/, or type
ERROR (line 9): Invalid line: Was expecting '\n' but found
"vg_internal_root / 128G ext4 rw" instead
Syntax error
```
FAI version : 6.23
Host : Debian 12
Destination : Debian 12
Regards,
Nicolas
More information about the linux-fai
mailing list