WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] (no subject)

To: Jefferson Ng <jwng@xxxxxxxxxxx>
Subject: Re: [Xen-devel] (no subject)
From: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Date: Sun, 07 Dec 2003 01:20:05 +0000
Cc: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx, Steven.Hand@xxxxxxxxxxxx
Delivery-date: Sun, 07 Dec 2003 01:20:06 +0000
Envelope-to: Steven.Hand@xxxxxxxxxxxx
In-reply-to: Message from Jefferson Ng <jwng@xxxxxxxxxxx> of "Sat, 06 Dec 2003 16:27:10 PST." <Pine.GSO.4.58.0312061623520.6635@xxxxxxxxxxxxxxxx>
>Thanks for the reply--
>
>> I think the second message may be due to an old bug in the tools
>> -- try '-phda2' (removing /dev)
>>
>> [I presume /dev/hda2 is where you have installed your second
>> distribution -- make sure you don't mount the same partition r/w
>> twice otherwise thew filesystem will be destroyed!]
>
>This part is a little confusing...  Does this mean we needed to have a
>completely separate partition for xenolinux?  The install script didn't
>seem to imply that we needed to move all the files it built into a new
>partition for xenolinux to use.  Although it does make sense.
>
>So just to be absolutely certain before we start some formatting--does
>xenolinux have to have its root on a partition that the original Redhat
>and Xen don't use?  And if so, what files go into that partition?

I think you're a little confused: Xen itself doesn't use /any/ filesystems.
What happens is at start of day, Xen boots, and then boots the first guest
operating system ("domain 0"). This is a standard XenoLinux image and will
typically have a / and a /usr (and perhaps more). This first domain can 
'share' the same filesystem layout as your "native" linux if you have one
installed on the same machine.

However if you wish to start a second (or third, or fourth, etc) domain,
then each of these will require its own '/' on a different partition; this
is since each of them needs to be able to write to e.g. /var/log/ or /tmp 
and so forth. You *can* share a single /usr partition between all domains
if you like, but if you do this you need to make sure that all domains have
only read access (otherwise they will completely moulinex the filesystem). 

So for example a typical setup might be: 

/dev/hda1: /usr for all domains [mounted read-only by all of them]
/dev/hda2: / for domain 0
/dev/hda3: / for domain 1
/dev/hda4: / for domain 2
/dev/hda5: / for domain 3
/dev/hda6: / for domain 3
... etc

Initially you just need /dev/hda1 and /dev/hda2 to be ok => you can 
boot Xen and XenoLinux (domain 0), and log in. As root in domain 0, 
you can format the disk, or mkfs the various partitions. Typically 
you can just have identically sized partitions for all of the roots, 
and the contents will be identical save for /etc/fstab ... e.g. for 
domain 0 you might have 

/dev/hda2 /    ext3 defaults     1 1 
/dev/hda1 /usr ext3 defaults,ro  0 0 

while for domain 3 (whose root filesystem is on /dev/hda5 in our example) 
you might have 

/dev/hda5 /    ext3 defaults     1 1 
/dev/hda1 /usr ext3 defaults,ro  0 0 



Two further notes: 

 1) it is possible to have several domains running XenoLinux without 
    any harddisk usage if you boot them the way that the demo CD does; 
    however this is slow and memory intensive (uses ramdisk + CD /usr) 

 2) the 'wastage' of having multiple root filesystems is not too bad 
    currently since most stuff is in /usr; however we're working on a 
    variety of copy-on-write techniques to reduce wastage further...


HTH, 

S.

 

<Prev in Thread] Current Thread [Next in Thread>