Home » , » Xen: Add Extra Partitions to Guest OS

Xen: Add Extra Partitions to Guest OS

Written By 1 on Monday, December 31, 2012 | 1:45 AM

1.) Create logical partition and format it. Example below creates “40GB” partition and “ext3” format in “vg0” volume group.

lvcreate -L 40G -n extra_storage vg0
mkfs -t ext3 -v /dev/vg0/extra_storage

2.) Update xen config to add new partition to guest os. Assign device name to it, example “xvda3”. Then re-create the VM to recognize the new partition/device. Note: reboot doesn’t read the new xen configuration.

disk        = [
     'phy:/dev/vg0/extra_storage,xvda3,w',

3.) After you reboot, login to VM and mount the new partition. New drive or partition shoud be in “/dev/xvda3.”

mount /dev/xvda3 /extra_space

Add it to “/etc/fstab” to automount on reboot.

/dev/xvda3 /extra_space ext3 noatime,nodiratime,errors=remount-ro 0 1

0 Comment:

Post a Comment