Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- touch /home/liveuser/Desktop/resize.sh
- cat > /home/liveuser/Desktop/resize.sh <<EOF
- lvchange -a y
- ROOTVOL=/dev/mapper/vg_blago-lv_root
- mkdir /tmp/lvroot
- mount -t ext4 -o ro $ROOTVOL /tmp/lvroot
- usedROOT=$(df -h $ROOTVOL | tail -1 | awk '{print $2}' | awk '{printf("%dn",$1 + 1)}')
- umount /tmp/rootvol
- /sbin/lvresize --resizefs --size $usedROOTg $ROOTVOL
- e2fsck $ROOTVOL
- sleep 1
- # reduce home volume
- HOMEVOL=/dev/mapper/vg_blago-lv_home
- mkdir /tmp/lvhome
- mount -t ext4 -o ro $HOMEVOL /tmp/lvhome
- usedROOT=$(df -h $HOMEVOL | tail -1 | awk '{print $2}' | awk '{printf("%dn",$1 + 1)}')
- umount /tmp/lvhome
- e2fsck $HOMEVOL
- EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement