{{tag>Brouillon LVM Block Cloud}} = Cloud LVM autoresize partition PV #! /bin/bash PV_PART=$(pvdisplay -c |cut -d: -f1 |awk '{print $1}' |head -1) PV_DISK="${PV_PART/[0-9]/}" parted -s "$PV_DISK" print fix > /dev/null PARTNB_EXTENDED=$(parted -s "$PV_DISK" print |awk '/extended$/ {print $1}') PARTNB_LVM=$(parted -s "$PV_DISK" print |awk '/lvm$/ {print $1}') if [ ! -z ${PARTNB_EXTENDED+x} ]; then parted "$PV_DISK" resizepart "$PARTNB_EXTENDED" 100% ; fi parted -s "$PV_DISK" resizepart "$PARTNB_LVM" 100% pvresize "$PV_PART" A corriger : * Si plusieurs PV. Car ''head -1'' n'est pas une solution Fonctionnalité à ajouter * UEFI ? * Lancement via cloudinit