Last active
September 17, 2016 18:22
-
-
Save TobleMiner/c7a8282e88acba901d0b99efe941f3ea to your computer and use it in GitHub Desktop.
Resize and prepare vserver volumes
This file contains hidden or 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
kpartx -a | |
blkid - record partition uuids | |
fdisk | |
p - grab partition information (Ids > 4 are logical volumes inside extended volumes) | |
d - delete all partitions | |
n - create partitions with correct offsets | |
kpartx -d | |
kpartx -a - get new partitions and their sizes | |
resize2fs - resize partitions to new block device size | |
tune2fs -U - adjust partition uuids to match previosly recorded ones | |
mkswap - create swap volumes with correct ids |
This file contains hidden or 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
egrep -o "[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{8}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment