Forked from runozo/Fix bad partitioning with LVM
Last active
October 18, 2018 06:14
-
-
Save h6w/94b8026680baeba7fa795ff93c715535 to your computer and use it in GitHub Desktop.
Fix CloudatCost default partitioning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Disk identifier: 0x061e4152 | |
Device Boot Start End Sectors Size Id Type | |
/dev/sda1 * 2048 499711 497664 243M 83 Linux | |
/dev/sda2 501758 20969471 20467714 9.8G 5 Extended | |
/dev/sda3 20969472 122879999 101910528 48.6G 83 Linux | |
/dev/sda5 501760 20969471 20467712 9.8G 8e Linux LVM | |
pvcreate /dev/sda3 | |
vgextend localhost-vg /dev/sda3 | |
pvmove /dev/sda5 /dev/sda3 | |
vgreduce localhost-vg /dev/sda5 | |
pvremove /dev/sda5 | |
fdisk -> delete sda5 | |
fdisk -> delete sda2 | |
fdisk -> create sda2 primary 8e | |
reboot | |
pvcreate /dev/sda2 | |
vgextend localhost-vg /dev/sda2 | |
pvmove /dev/sda3 /dev/sda2 | |
fdisk -> delete sda3 | |
fdisk -> delete sda2 | |
fdisk -> create sda2 primary 8e | |
reboot | |
pvresize /dev/sda2 | |
lvresize -l +100%FREE /dev/mapper/localhost--vg-root | |
resize2fs /dev/mapper/localhost--vg-root | |
Device Boot Start End Sectors Size Id Type | |
/dev/sda1 * 2048 499711 497664 243M 83 Linux | |
/dev/sda2 499712 40959999 40460288 19.3G 8e Linux LVM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment