Current File : //root/fsresize.sh
#!/bin/bash
#Extend Physical Volume first
pvresize /dev/sda2

#Extend LVM, using 100% of the free allocation units and resize filesystem
lvextend --extents +100%FREE /dev/mapper/centos-root --resizefs
chmod -x $0
#Cleanup systemd autostart script again.
systemctl disable fsresize.service
rm -f /etc/systemd/system/fsresize.service