Hi,
On SLES10, I have a separate /home partition on dom0 which is mounted read - write.
1) How do I mount a /home partition on domU? Do I need to create a file - backed VBD?
The second entry for disk=[ '/dev/....' ] in the sample xmexample corresponds to /usr. How do I create a entry for /home?
I started by answering #2 below, but the answer here applies as well. /usr/... is almost allways read-only (unless you're instaling new applications or something), so it's feasible to mount this Read-Only across multiple domains - if the file-system is read-only by all clients, it's fine to mount it multiple times from different places, since the content isn't going to chnge ...
<<
I created a file backed VBD for /home and added a entry in the configuration file for domU as :
disk = [ 'file:/root/rootdisk,sda2,w' ] # this is the entry for / partition. /dev/sda2 is my root partition on dom0.
disk = [ 'file:/root/homedisk,sda3,w' ] # Newly created entry for /home.
/dev/sda3 is my /home on dom0.
However, when I do a xm create with the above
configuration, the root device does not mount (which was mounting fine before adding an entry for /home partition). Is this because the second entry is supposed to represent /usr (and in my case it represents /home)?
>>
2) I created a file - backed VBD for the / partition on domU. Is it possible to mount the / (root) partition of dom0 as root partition in domU, and be able to write to it?
Not unless your Dom0-root is an NFS-mounted "partition" (and I doubt that you'd use the word partition in that case).
Any read-write mounted file-system needs to have ONE AND ONLY ONE mountee - otherwise you'll end up with a crashed file-system, because there are BIG race-conditions that are cared for by locks inside the file-system driver, but if you're using two different file-system drivers with different address spaces, that isn't going to work.
Read-only filesystems can be mounted multiple times, and there are "special" file-systems that are capable of supporting multiple clients, but that's not your average rootfs for Dom0... It's either a case of "copy-on-write" implementations, or "cluser-file-system" [which may be COW-implementation, of course].
Filesystem choice is quite frequently discussed on this mailing list, so searching the archive would probably give you more answers than you can have questions...
--
Mats
Thanks in advance,
Rajarshi