Page MenuHomePhabricator

/usr/local/sbin/make-instance-vg broken on buster
Closed, ResolvedPublic

Description

Hi, today i tried enabling the lvm class to increase /srv but it failed with:

Error: '/usr/local/sbin/make-instance-vg '/dev/vda'' returned 1 instead of one of [0]
Error: /Stage[main]/Labs_lvm/Exec[create-volume-group]/returns: change from 'notrun' to ['0'] failed: '/usr/local/sbin/make-instance-vg '/dev/vda'' returned 1 instead of one of [0]


root@deploy1001:/home/paladox# /usr/local/sbin/make-instance-vg /dev/vda
/usr/local/sbin/make-instance-vg: failed to create new partition





root@deploy1001:/home/paladox# bash -x /usr/local/sbin/make-instance-vg /dev/vda
+ device=/dev/vda
++ /sbin/parted -s /dev/vda print free
++ /bin/sed -e 's/  */ /g'
++ /bin/grep 'Free Space'
++ /usr/bin/cut -d ' ' -f 2,3
++ /usr/bin/tail -n 1
+ /sbin/parted -s /dev/vda mkpart primary
+ echo '/usr/local/sbin/make-instance-vg: failed to create new partition'
/usr/local/sbin/make-instance-vg: failed to create new partition
+ exit 1

Instance: deploy1001.devtools.eqiad.wmflabs

Event Timeline

$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda2        40G  1.9G   36G   5% /

This is one of the Buster instances where the whole 40G went into the root partition (T241322). It would be nice if make-instance-vg had a nicer error message for this system state.

Change 564847 merged by Andrew Bogott:
[operations/puppet@production] make-instance-vg: check if lvm is present before we start

https://gerrit.wikimedia.org/r/564847

Added a clearer error handler