I'm fairly new to github but just wanted to give my thanks for the ubuntu templatising scripts! It's made my job a lot easier :)
I added the below bit, which will extend the disk if needed, to the rc.local file in my own my own template. I figured I'd share it just in case you might want to add it to your own script (since a cloned machine often has a different sized disk).
# Extend disk
parted /dev/sda resizepart 3 -s
if [ $? -ne 0 ]; then
echo "Nothing to do"
else
growpart /dev/sda 3
pvresize /dev/sda3
lvresize -l+100%FREE --resizefs /dev/mapper/ubuntu--vg-ubuntu--lv
fi
I'm fairly new to github but just wanted to give my thanks for the ubuntu templatising scripts! It's made my job a lot easier :)
I added the below bit, which will extend the disk if needed, to the rc.local file in my own my own template. I figured I'd share it just in case you might want to add it to your own script (since a cloned machine often has a different sized disk).