arvidjaar / bootinfoscript

71 stars 20 forks source link

Broken size handling with LVM (`value too great for base`) #15

Open mika opened 3 years ago

mika commented 3 years ago

Quoting from RESULTS.txt of an affected system:

[...]
=============================== StdErr Messages: ===============================

/usr/sbin/bootinfoscript: line 2553: 805044224S: value too great for base (error token is "805044224S")

Running bootinfoscript under set -x reveals, that this is derived from the lvs output:

# lvs --nameprefixes --noheadings --options lv_name,vg_name,lv_size,lv_attr --units s
  LVM2_LV_NAME='data' LVM2_VG_NAME='ngcp' LVM2_LV_SIZE='805044224S' LVM2_LV_ATTR='-wi-ao----'
  LVM2_LV_NAME='fallback' LVM2_VG_NAME='ngcp' LVM2_LV_SIZE='20971520S' LVM2_LV_ATTR='-wi-ao----'
  LVM2_LV_NAME='root' LVM2_VG_NAME='ngcp' LVM2_LV_SIZE='20971520S' LVM2_LV_ATTR='-wi-ao----'

FYI:

+ lvs --nameprefixes --noheadings --options lv_name,vg_name,lv_size,lv_attr --units s
+ read line
+ LVM2_VG_NAME=
+ LVM2_LV_NAME=
+ LVM2_LV_SIZE=
+ LVM2_LV_ATTR=
+ eval 'LVM2_LV_NAME='\''data'\'' LVM2_VG_NAME='\''ngcp'\'' LVM2_LV_SIZE='\''805044224S'\'' LVM2_LV_ATTR='\''-wi-ao----'\'''
++ LVM2_LV_NAME=data
++ LVM2_VG_NAME=ngcp
++ LVM2_LV_SIZE=805044224S
++ LVM2_LV_ATTR=-wi-ao----
+ '[' -z ngcp ']'
+ '[' -z data ']'
+ '[' -z 805044224S ']'
+ '[' -z -wi-ao---- ']'
+ name=ngcp-data
+ LVM=/dev/mapper/ngcp-data
+ LVM_Size=805044224S
+ LVM_Status=a
+ lvchange -ay /dev/mapper/ngcp-data
+ mountname=LVM/ngcp-data
+ kind=LVM
+ start=0
+ end=805044224S
+ system=
+ PI=
+ Get_Partition_Info /tmp/BootInfo-iFhfaNh9/Log /tmp/BootInfo-iFhfaNh9/Log1 /dev/mapper/ngcp-data ngcp-data LVM/ngcp-data LVM 0 805044224S '' ''
+ local Log=/tmp/BootInfo-iFhfaNh9/Log Log1=/tmp/BootInfo-iFhfaNh9/Log1 part=/dev/mapper/ngcp-data name=ngcp-data mountname=LVM/ngcp-data kind=LVM start=0 end=805044224S system= PI=
/usr/sbin/bootinfoscript: line 2553: 805044224S: value too great for base (error token is "805044224S")
arvidjaar commented 3 years ago

lvs --nameprefixes --noheadings --options lv_name,vg_name,lv_size,lv_attr --units s

Could you test with additional --nosuffix option?

mika commented 3 years ago

Jepp, --nosuffix seems to do the trick and works fine!