In My Setup....
To resize 4Gb img ( xen virtual machine) to 9Gb
Following steps perform by me & working fine. going to share with you.
1) xm list ( show current running VM)
2) xm shutdown sgd1mon1 ( to shutdown the machine)
3) For safer side .. i take the backup.
[root@sgd1vmbe09 ~]# cd /var/lib/xen/images/
#cp -a sgd1mon1.img sgd1mon1.img.bak
4) verify MD5 Sum
# md5sum sgd1mon1.img
8dfb611eacd0aa7291d1737967845688 sgd1mon1.img
# md5sum sgd1mon1.img.bak
8dfb611eacd0aa7291d1737967845688 sgd1mon1.img.bak
5) Created 5Gb temp file
[root@sgd1vmbe09 images]# dd if=/dev/zero of=tempfile bs=1024 count=5000000
5000000+0 records in
5000000+0 records out
5120000000 bytes (5.1 GB) copied, 77.1266 seconds, 66.4 MB/s
6) Appending the existing image.
[root@sgd1vmbe09 images]# cat tempfile >> sgd1mon1.img
7) Resize the space
[root@sgd1vmbe09 images]# resize2fs -f sgd1mon1.img
8) check a Linux ext2/ext3 file system
[root@sgd1vmbe09 images]# fsck.ext3 sgd1mon1.img
9) Finally start the VM
[root@sgd1vmbe09 images]# xm create sgd1mon1
Using config file "/etc/xen/sgd1mon1".
Started domain sgd1mon1
10) Login and check the partition table.
[root@sgd1mon1 ~]# fdisk -l
Disk /dev/xvda: 9314 MB, 9314304000 bytes
255 heads, 63 sectors/track, 1132 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Next part extend the machine LVM.... :)
Tuesday, February 2, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment