Problem with setup-storage preserving an existing LVM over RAID volume

Christian Meyer c2h5oh at web.de
Fri Jan 4 18:43:13 CET 2019


Hello there,

doing my fist server-lessions, I'm facing two problems with setup-
storage.
This one is about preserving an existing LVM over RAID volume.

I managed to install an lvm over two raid volumes (md1 and md2) with
FAI and the first disk_config line (now #-ed).
In the second run I try to preserve partitions, md's and lv's, but I'm
getting an error telling me to file a bug report. (I rather think it's
a problem with configuration and/or my customized configspace. BTW: I
don't do anything with mdadm or lv* in class/*)

Obviously Parser.pm complains about an "uninitialized value $this_mp",
but I found the syntax of "disk_config ..." in the mailing list archive
and have no glue what it could mean.

Is the problem anyway related with "WARNING: Failed to connect to
lvmetad." or missing commands in my class/* or hook/* ?

Previously there has been a problem reinstalling the complete RAID/LVM,
but this I could fix by calling:
# lvremove /dev/vg_guests/*
# mdadm --stop /dev/md*
# mdadm --zero-superblock /dev/sd*
But since I want to keep my VMs, this is not what I want to do.


Thanks a lot for your help.

Christian


The error says:
# ----------------------------------------------------
# setup-storage -f /var/lib/fai/config/disk_config/KVM
setup-storage is running in test-only mode
Starting setup-storage 2.0
Using config file: /var/lib/fai/config/disk_config/KVM
Use of uninitialized value $this_mp in string eq at
/usr/share/fai/setup-storage/Parser.pm line 1225, <$config_file> line
1.
Use of uninitialized value $this_mp in hash element at
/usr/share/fai/setup-storage/Parser.pm line 1226, <$config_file> line
1.
Use of uninitialized value $this_mp in string eq at
/usr/share/fai/setup-storage/Parser.pm line 1230, <$config_file> line
1.
Use of uninitialized value $this_mp in hash element at
/usr/share/fai/setup-storage/Parser.pm line 1230, <$config_file> line
1.
File descriptor 4 (/dev/tty2) leaked on vgdisplay invocation. Parent
PID 4072: /usr/bin/perl
File descriptor 63 (pipe:[14331]) leaked on vgdisplay invocation.
Parent PID 4072: /usr/bin/perl
  WARNING: Failed to connect to lvmetad. Falling back to device
scanning.
File descriptor 4 (/dev/tty2) leaked on vgdisplay invocation. Parent
PID 4072: /usr/bin/perl
File descriptor 63 (pipe:[14331]) leaked on vgdisplay invocation.
Parent PID 4072: /usr/bin/perl
  WARNING: Failed to connect to lvmetad. Falling back to device
scanning.
INTERNAL ERROR in setup-storage:
convert_unit 1,81TiB
Please report this error to the Debian Bug Tracking System.
 at /usr/share/fai/setup-storage/Parser.pm line 379.
	FAI::convert_unit("1,81TiB") called at /usr/share/fai/setup-
storage/Volumes.pm line 416
	FAI::get_current_lvm called at /usr/sbin/setup-storage line 167
# ----------------------------------------------------

This is my disk_config/KVM
# ----------------------------------------------------
# This is my disk_config/KVM
# Disks:
# ======
# disk_config sda disklabel:msdos bootable:1 fstabkey:uuid
disk_config sda disklabel:msdos bootable:1 fstabkey:uuid
preserve_reinstall:3
# <type> <mountpoint> <size>   <fs type> <mount options> <misc options>
primary   -           10G     -          -
primary   swap        2G      swap       sw
primary   -           50G-    -          -

disk_config sdb sameas:sda
# disk_config sdc disklabel:msdos fstabkey:uuid
disk_config sdc disklabel:msdos fstabkey:uuid preserve_reinstall:1
primary   -           300G-      -          -
disk_config sdd sameas:sdc

# RAID:
# =====
# disk_config raid fstabkey:uuid
disk_config raid fstabkey:uuid preserve_reinstall:2,3
raid1      /       sda1,sdb1    ext4    rw,noatime,errors=remount-ro
raid1      -       sda3,sdb3    -       -
raid1      -       sdc1,sdd1    -       -

# LVM:
# ====
# disk_config lvm fstabkey:uuid
disk_config lvm fstabkey:uuid preserve_reinstall:vg_guests-1,vg_guests-
2,vg_guests-3,vg_guests-4
vg vg_guests md1,md2
vg_guests-1  -     50G        ext4       rw,noatime,errors=remount-ro
vg_guests-2  -     50G        ext4       rw,noatime,errors=remount-ro
vg_guests-3  -     50G        ext4       rw,noatime,errors=remount-ro
vg_guests-4  -     200G-500G  ext4       rw,noatime,errors=remount-ro
# ----------------------------------------------------

If it's helpfull, here is the full output of
# setup-storage -f /var/lib/fai/config/disk_config/KVM -d
# ----------------------------------------------------
setup-storage is running in test-only mode
disklist: md125
md126
md127
sda
sdb
sdc
sdd
Starting setup-storage 2.0
Using config file: /var/lib/fai/config/disk_config/KVM
Input was:

--- see config-file above --- 

Use of uninitialized value $this_mp in string eq at
/usr/share/fai/setup-storage/Parser.pm line 1225, <$config_file> line
1.
Use of uninitialized value $this_mp in hash element at
/usr/share/fai/setup-storage/Parser.pm line 1226, <$config_file> line
1.
Use of uninitialized value $this_mp in string eq at
/usr/share/fai/setup-storage/Parser.pm line 1230, <$config_file> line
1.
Use of uninitialized value $this_mp in hash element at
/usr/share/fai/setup-storage/Parser.pm line 1230, <$config_file> line
1.
(CMD) parted -s /dev/sda unit TiB print 1> /tmp/Szi9WePf8R 2>
/tmp/0S18m_2Hgo
Executing: parted -s /dev/sda unit TiB print
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sda: 0,91TiB
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start    End      Size     Type     File
system     Flags
(STDOUT)  1      0,00TiB  0,01TiB  0,01TiB  primary                  bo
ot, raid
(STDOUT)  2      0,01TiB  0,01TiB  0,00TiB  primary  linux-swap(v1)
(STDOUT)  3      0,01TiB  0,91TiB  0,90TiB  primary                  ra
id
(STDOUT) 
(CMD) parted -s /dev/sda unit B print free 1> /tmp/wLIUfSm8Rq 2>
/tmp/hHhvSiHgPV
Executing: parted -s /dev/sda unit B print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sda: 1000204886016B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT)
Number  Start         End             Size           Type     File
system     Flags
(STDOUT)         32256B        1048575B        1016320B                
Free Space
(STDOUT)  1      1048576B      10738466815B    10737418240B   primary  
                boot, raid
(STDOUT)  2      10738466816B  12885950463B    2147483648B    primary  
linux-swap(v1)
(STDOUT)  3      12885950464B  1000204886015B  987318935552B  primary  
                raid
(STDOUT) 
(CMD) parted -s /dev/sda unit chs print free 1> /tmp/ygJClyIsiA 2>
/tmp/xQTmbcS0bz
Executing: parted -s /dev/sda unit chs print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sda: 121601,80,62
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 121601,255,63.  Each
cylinder is 8225kB.
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start        End           Type     File
system     Flags
(STDOUT)         0,1,0        0,32,31                Free Space
(STDOUT)  1      0,32,32      1305,138,48   primary                  bo
ot, raid
(STDOUT)  2      1305,138,49  1566,160,1    primary  linux-swap(v1)
(STDOUT)  3      1566,160,2   121601,80,62  primary                  ra
id
(STDOUT) 
(CMD) parted -s /dev/sdb unit TiB print 1> /tmp/lfLvt221Kh 2>
/tmp/Hqdz0yfmZq
Executing: parted -s /dev/sdb unit TiB print
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdb: 0,91TiB
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start    End      Size     Type     File
system     Flags
(STDOUT)  1      0,00TiB  0,01TiB  0,01TiB  primary                  bo
ot, raid
(STDOUT)  2      0,01TiB  0,01TiB  0,00TiB  primary  linux-swap(v1)
(STDOUT)  3      0,01TiB  0,91TiB  0,90TiB  primary                  ra
id
(STDOUT) 
(CMD) parted -s /dev/sdb unit B print free 1> /tmp/cVs3uD9XGt 2>
/tmp/q1j3b6xmZN
Executing: parted -s /dev/sdb unit B print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdb: 1000204886016B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT)
Number  Start         End             Size           Type     File
system     Flags
(STDOUT)         32256B        1048575B        1016320B                
Free Space
(STDOUT)  1      1048576B      10738466815B    10737418240B   primary  
                boot, raid
(STDOUT)  2      10738466816B  12885950463B    2147483648B    primary  
linux-swap(v1)
(STDOUT)  3      12885950464B  1000204886015B  987318935552B  primary  
                raid
(STDOUT) 
(CMD) parted -s /dev/sdb unit chs print free 1> /tmp/AUYjj2qCq_ 2>
/tmp/zvW8yIaq0I
Executing: parted -s /dev/sdb unit chs print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdb: 121601,80,62
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 121601,255,63.  Each
cylinder is 8225kB.
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start        End           Type     File
system     Flags
(STDOUT)         0,1,0        0,32,31                Free Space
(STDOUT)  1      0,32,32      1305,138,48   primary                  bo
ot, raid
(STDOUT)  2      1305,138,49  1566,160,1    primary  linux-swap(v1)
(STDOUT)  3      1566,160,2   121601,80,62  primary                  ra
id
(STDOUT) 
(CMD) parted -s /dev/sdc unit TiB print 1> /tmp/CIvf876fM1 2>
/tmp/e3U0_0v6y9
Executing: parted -s /dev/sdc unit TiB print
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdc: 0,91TiB
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start    End      Size     Type     File system  Flags
(STDOUT)  1      0,00TiB  0,91TiB  0,91TiB  primary               raid
(STDOUT) 
(CMD) parted -s /dev/sdc unit B print free 1> /tmp/ioUENI2XfE 2>
/tmp/XREmKFdk1n
Executing: parted -s /dev/sdc unit B print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdc: 1000204886016B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT)
Number  Start     End             Size            Type     File
system  Flags
(STDOUT)         32256B    1048575B        1016320B                 Fre
e Space
(STDOUT)  1      1048576B  1000204886015B  1000203837440B  primary     
          raid
(STDOUT) 
(CMD) parted -s /dev/sdc unit chs print free 1> /tmp/IkbGY5PSzS 2>
/tmp/hBHCLPKufM
Executing: parted -s /dev/sdc unit chs print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdc: 121601,80,62
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 121601,255,63.  Each
cylinder is 8225kB.
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start    End           Type     File system  Flags
(STDOUT)         0,1,0    0,32,31                Free Space
(STDOUT)  1      0,32,32  121601,80,62  primary               raid
(STDOUT) 
(CMD) parted -s /dev/sdd unit TiB print 1> /tmp/bgKYdqbnSi 2>
/tmp/BP6RQ2bf7l
Executing: parted -s /dev/sdd unit TiB print
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdd: 0,91TiB
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start    End      Size     Type     File system  Flags
(STDOUT)  1      0,00TiB  0,91TiB  0,91TiB  primary               raid
(STDOUT) 
(CMD) parted -s /dev/sdd unit B print free 1> /tmp/6l_D81qb6l 2>
/tmp/FFORUMZTCY
Executing: parted -s /dev/sdd unit B print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdd: 1000204886016B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT)
Number  Start     End             Size            Type     File
system  Flags
(STDOUT)         32256B    1048575B        1016320B                 Fre
e Space
(STDOUT)  1      1048576B  1000204886015B  1000203837440B  primary     
          raid
(STDOUT) 
(CMD) parted -s /dev/sdd unit chs print free 1> /tmp/dhoIFeYhcQ 2>
/tmp/Yiyyc3ZY4P
Executing: parted -s /dev/sdd unit chs print free
(STDOUT) Model: ATA ST31000524NS (scsi)
(STDOUT) Disk /dev/sdd: 121601,80,62
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 121601,255,63.  Each
cylinder is 8225kB.
(STDOUT) Partition Table: msdos
(STDOUT) Disk Flags: 
(STDOUT) 
(STDOUT) Number  Start    End           Type     File system  Flags
(STDOUT)         0,1,0    0,32,31                Free Space
(STDOUT)  1      0,32,32  121601,80,62  primary               raid
(STDOUT) 
File descriptor 4 (/dev/tty2) leaked on vgdisplay invocation. Parent
PID 3968: /usr/bin/perl
File descriptor 63 (pipe:[14331]) leaked on vgdisplay invocation.
Parent PID 3968: /usr/bin/perl
  WARNING: Failed to connect to lvmetad. Falling back to device
scanning.
File descriptor 4 (/dev/tty2) leaked on vgdisplay invocation. Parent
PID 3968: /usr/bin/perl
File descriptor 63 (pipe:[14331]) leaked on vgdisplay invocation.
Parent PID 3968: /usr/bin/perl
  WARNING: Failed to connect to lvmetad. Falling back to device
scanning.
INTERNAL ERROR in setup-storage:
convert_unit 1,81TiB
Please report this error to the Debian Bug Tracking System.
 at /usr/share/fai/setup-storage/Parser.pm line 379.
	FAI::convert_unit("1,81TiB") called at /usr/share/fai/setup-
storage/Volumes.pm line 416
	FAI::get_current_lvm called at /usr/sbin/setup-storage line 167




More information about the linux-fai mailing list