2vm. fdisk /dev/hda -> remove swap partition (comment in fstab)
3dom0. shutdown domU
- Code: Select all
xm shutdown vm112
4dom0.
- Code: Select all
lvextend /dev/xennode1/vm112_img -L125G -v
- Code: Select all
[root@xennode1 ~]# lvextend /dev/xennode1/vm112_img -L125G -v
Finding volume group xennode1
Archiving volume group "xennode1" metadata (seqno 134).
Extending logical volume vm112_img to 125.00 GB
Found volume group "xennode1"
Found volume group "xennode1"
Loading xennode1-vm112_img table (253:1)
Suspending xennode1-vm112_img (253:1) with device flush
Found volume group "xennode1"
Resuming xennode1-vm112_img (253:1)
Creating volume group backup "/etc/lvm/backup/xennode1" (seqno 135).
Logical volume vm112_img successfully resized
5. boot to rescue cd
6rescue. Check:
- Code: Select all
unount /dev/sda1
fdisk -l /dev/sda
fsck -n /dev/sda1
7. Remove the journal from /dev/sda1, thus turning it into an ext2 partition:
- Code: Select all
tune2fs -O ^has_journal /dev/sda1
8. Use fdisk to delete current /dev/sda1 partition and create a bigger one:
- Code: Select all
fdisk /dev/xennode1/vm112_img
...
...
...
9rescue. Reboot
- Code: Select all
shutdown -r now
10rescue.
- Code: Select all
e2fsck -y -f /dev/sda1
resize2fs /dev/sda1
- Code: Select all
fsck -n /dev/sda1
Enable and create journal
- Code: Select all
tune2fs -j /dev/sda1
11. boot into os
- Code: Select all
mkswap /dev/hda2 (or if label needed mkswap /dev/hda2 -L SWAP-hda2)
swapon
http://www.howtoforge.com/linux_resizing_ext3_partitions_p2