#!/bin/bash echo "- - -" > /sys/class/scsi_host/host0/scan diskn=$(fdisk -l | grep "Disk " | grep "/dev/sd" | awk '{print $2}' | sort -r | head -1 | cut -d : -f 1) pvcreate $diskn vgn=$(vgdisplay | grep "VG Name" | awk '{print $3}') vgextend $vgn $diskn lvp=$(lvdisplay | grep "LV Path" | awk '{print $3}') lvextend -l +100%FREE $lvp xfs_growfs $lvp