[xen-tools] Re: Outstanding bugs/requests for 3.0?

From: Steve Kemp <steve_at_steve.org.uk>
Date: Fri, 1 Dec 2006 09:46:54 +0000
On Thu, Nov 30, 2006 at 03:46:06PM -0500, Ward Vandewege wrote:

> So - I have another (small?) feature request. Would it be hard to add a way
> to create several partitions from the command line/config file? I.e. a
> separate /home, or a /tmp, etc?

> Or am I missing something and can this already be done?

  You could do it right now, but it would involve you writing a role
 script and making a custom xm.tmpl file.

  There are three steps:

    1.  Create the LVM partition/EVMS volume/loopback filesystem to
       hold the partition.
    2.  Make a filesystem on it.
    3.  Add it to /etc/fstab on the new image.
    4.  Add it to the generated /etc/xen/*.cfg file - via the template.

  I guess that you'd need something like this:

        xen-create-image --role=home --template=home.tmpl ...

  Where the "home" role script ran something like this :

    dd if=/dev/zero of=/machines/${hostname}/home.img
    mkfs.ext3 /machines/${hostname}/home.img
    echo "/dev/sda3 /home           ext3    defaults        0" >> ${prefix}/etc/fstab
 
  That gives you the first three steps.

  The last part would involve modifying the xm.tmpl file to make sure
 the new image was included in the file.  Maybe something like this:

          $OUT .= "disk    = [ '$image_vbd,$device" . "1,w' ,
                               '/machines/$hostname/home.img,/dev/sda3,w']";

   Does that help?

Steve
--
Received on Fri Dec 01 2006 - 09:47:25 GMT

Mailing list overview.