Xen mounting another lv in guests

Discussion in 'HOWTO-Related Questions' started by Bei, Feb 7, 2009.

  1. Bei

    Bei New Member

    Following this guide:

    I had a simple question.

    I used the lvm option as i see great potential here.

    I have successfully create 3 guest O/S'es

    Guest 1 - Samba / PDC
    Guest 2 - Zimbra Mail Server
    Guest 3 - Apache php / mysql server

    What I would like to make the base lvm for all the guests as small as i need for the basic systems.

    Is it possible to make a lv on the hosts and mount it in the guests for more flexibility on disk space?

    for example Guest 1 has its base setup with 5G lv mounted in the guest as /,
    I would like to create a new lv on the host that is say 200G and mount that in Guest 1 in /home/shares.
  2. atjensen11

    atjensen11 New Member

    If I understand you correctly, you are wanting to pass another disk device to your DomU. I have done this a few times in Ubuntu 8.04.

    In my DomU config file, I add another device line such as:

    disk        = [
    Restart the DomU and then within the DomU virtual machine, edit the fstab file.

    # /etc/fstab: static file system information.
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    /dev/xvda1 none swap sw 0 0
    /dev/xvda2 / ext3 noatime,nodiratime,errors=remount-ro 0 1
    /dev/xvda3 /home/files  ntfs-3g defaults        0       0
    In my case, the third entry is the extra device we passed and is an NTFS partition for my file server.

    Then just issue a "mount -a" command at the command prompt and you should see your new partition mounted where you specified.
  3. Bei

    Bei New Member

    Thank you that is exactly what I was looking for. :)

Share This Page