Resize XEN VM disk and Swap Disk

master:~# fdisk /dev/xvda

Command (m for help): p
Command (m for help): d

Partition number (1-4):<enter partition number>

Command (m for help): n
Command action
e extended
p primary partition (1-4): p
Partition number (1-4): <enter partition number>
First cylinder (32-6527, default 32):
Last cylinder or +size or +sizeM or +sizeK (32-6527, default 6527):

Command (m for help): t
Partition number (1-4): <enter partition number>
Hex code (type L to list codes): 8e
Command (m for help): p
Command (m for help): w

The partition table has been altered!
master:~# reboot

when it has rebooted, you just have to resize the filesystem with..

master:~# resize2fs /dev/xvda1
master:~# reboot

Resize the SWAP Disk like this:

<run through the regular resize for a disk and reboot>

master:~# swapoff

master:~# cfdisk /dev/swap-partion

master:~# mkswap -c /dev/swap-partition

master:~# swapon -a


 

Comments are closed.