LAMP How To – Open Source At Work

Only Passion Matters

Entries Tagged ‘xen’

Creating Xen Redundant Virtual Machines with Backup Procedures

It is a good idea to backup the whole virtual machine to a separate machine to achieve redundancy. 99% uptime and full redundancy can be achieved using on-the-fly mirroring, ie network raid 1. Hardware and network performance will determine if this method will work or not. There are a few software that can achieve this. [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz

Resizing file based xen virtual machine

You can create file based xen instances (eg, blarblar.img). If you have partitions in the file and want to increase the disk space, you cannot use resize2fs straight away on it. So you need to create a new larger file, then transfer the old file data onto it:
say I want the new filesize to be [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz

How to resize LVM running Xen part 2 – decrease disk size

shrinking a lvm partition is straight forward if it doesn’t contain a partition table. Simply do a:

umount lvm_partition
resize2fs /dev/vg/lv newSize
lvresize -L disksize /dev/vg/lv
resize2fs /dev/vg/lv

execute the last command if nessary. Assuming you have a partition table in a 10G domU which uses the default partition table,

Disk /dev/xenvg/XenWeb: 10.5 GB, 10502537216 bytes
255 heads, 63 sectors/track, 1276 cylinders
Units [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz

How to resize LVM running Xen part 1 – increase disk size

Resizing a lvm partition is straight forward if it doesn’t contain a partition table. Simply do a:
lvresize -L disksize /dev/vg/lv
resize2fs /dev/vg/lv
If it is running a virtual machine like xen with a partition table, how to resize the domU, whether to shutdown domU or not depends largely on the partiton structure. In centos, if you do [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz

Xen Guest, Dom U – dont use LVM

I dont see any reason why one should use lvm in xen guest. The whole idea of using lvm is to have the ability to resize disk size easily and resizing a xen guest can be done easily without using LVM. Actually, having LVM in xen guest complicates the process of resizing… You can google [...]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz