Error in setup-storage in FAI 4.1

Thomas Neumann blacky+fai at fluffbunny.de
Fri Jun 20 10:42:23 CEST 2014


On Thursday 19 June 2014 13:14:47 Andreas Heinlein wrote:
> Before your patches, we always reached the wipefs bug (missing '/dev' in
> device name). Now, on the second run, we get:

Strange. I took your provided disk_config, configured a test and got this result:

Starting setup-storage 1.4
Using config file: /var/lib/fai/config/disk_config/DISK_TYPE5_preserve
Executing: parted -s /dev/sda unit TiB print
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
    Finding all volume groups
    Finding volume group "vg1"
    Finding all volume groups
    Finding volume group "vg1"
    Finding all volume groups
    Finding volume group "vg1"
    Finding all volume groups
    Finding volume group "vg1"
Executing: mdadm --examine --scan --verbose -c partitions
Preserved partition /dev/sda5 does not end at a cylinder boundary, parted may fail to restore the partition!
/dev/sda5 will be preserved
/dev/sda2 will be resized
Use of uninitialized value in string eq at /usr/share/fai/setup-storage//Commands.pm line 1136.
vg1/home will be preserved
Executing: wipefs -a /dev/sda1
Executing: vgchange -a n vg1
Executing: lvremove -f /dev/vg1/swap
Executing: lvremove -f /dev/vg1/root
Executing: lvremove -f /dev/vg1/varlog
Executing: lvremove -f /dev/vg1/tmp
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mkpart extended "" 313523200B 10737418239B
Executing: parted -s /dev/sda mkpart logical "" 313524224B 10737418239B
Executing: parted -s /dev/sda resize 1 313523200B 10737418239B
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mkpart primary "ext3" 1048576B 312475647B
Executing: parted -s /dev/sda set 1 boot on
Executing: parted -s /dev/sda mkpart extended "" 313523200B 10737418239B
Executing: parted -s /dev/sda set 2 lba on
Executing: parted -s /dev/sda mkpart logical "" 313524224B 10737418239B
Executing: parted -s /dev/sda set 5 lvm on
Executing: mkfs.ext4  /dev/sda1
Executing: vgchange -a y vg1
Executing: lvcreate  -n root -L 1024 vg1
Executing: mkfs.ext4  /dev/vg1/root
Executing: lvcreate  -n swap -L 1024 vg1
Executing: mkswap  /dev/vg1/swap
Executing: lvcreate  -n tmp -L 1024 vg1
Executing: mkfs.ext4  /dev/vg1/tmp
Executing: lvcreate  -n varlog -L 1024 vg1
Executing: mkfs.ext4  /dev/vg1/varlog
Executing: /usr/lib/fai/fai-vol_id -u /dev/sda1
Executing: /usr/lib/fai/fai-vol_id -l /dev/sda1
/dev/sda1 UUID=ec2a1b71-2fcc-480c-9143-28fce3a40cff
Executing: /usr/lib/fai/fai-vol_id -u /dev/vg1/swap
Executing: /usr/lib/fai/fai-vol_id -l /dev/vg1/swap
/dev/vg1/swap UUID=44b3e5d1-0157-47a8-b3c4-85ff63183366
Executing: /usr/lib/fai/fai-vol_id -u /dev/vg1/root
Executing: /usr/lib/fai/fai-vol_id -l /dev/vg1/root
/dev/vg1/root UUID=9cc88e27-8ac2-44f1-a451-1d50afe1a7f9
Executing: /usr/lib/fai/fai-vol_id -u /dev/vg1/varlog
Executing: /usr/lib/fai/fai-vol_id -l /dev/vg1/varlog
/dev/vg1/varlog UUID=f14598b5-eb7d-41c2-a8d7-2a4b9bbd88bf
Executing: /usr/lib/fai/fai-vol_id -u /dev/vg1/tmp
Executing: /usr/lib/fai/fai-vol_id -l /dev/vg1/tmp
/dev/vg1/tmp UUID=f733296d-50bd-4d69-88b6-7eb366b848bc
Executing: /usr/lib/fai/fai-vol_id -u /dev/vg1/home
Executing: /usr/lib/fai/fai-vol_id -l /dev/vg1/home
/dev/vg1/home UUID=85792f5e-86fb-451e-96fe-210d2ce581f4

I also looked at the lvdisplay output and it states that 'home' has been
created earlier then the other LVs - it has been preserved.
(Actually it hasn't because 'disable Volume Group, create new partition
table, create partitions, re-enable Volume Group' isn't exactly
'preserving', but oh well. One step at a time...)


my software versions:

# cat /etc/debian_version 
7.5

# uname -r
3.2.0-4-amd64

# vgdisplay --version
  LVM version:     2.02.95(2) (2012-03-06)
  Library version: 1.02.74 (2012-03-06)
  Driver version:  4.22.0

# dpkg -l fai-setup-storage | tail -n 1
ii  fai-setup-storage        4.0.8~deb7u1      all               automatically prepare storage devices



More information about the linux-fai mailing list