Skip to contentSkip to conversation

how to see the data changing in a running domain?

DISCUSSION aq 2 participants 2 messages Jan 23, 2005

lore
Share & tools
lore

aq

author
#0 lore raw

hello,

I wonder how I can see the (on-disk) data changing in a running domainU. I tried to do it, but the data looking from outside remains intact, no matter what I modified inside the domainU.

I did it this way: I use a file-based rootfs (got from ttylinux), and created a domainU on that rootfs. Everything was fine. Then from domain0, I mounted that "rootfs" file in read-only mode, with this
command: "mount -o loop -o ro rootfs /mnt". After that I could see the data inside the rootfs.

Then I suppose that from outside (domain0), I can watch for the data of domainU changing in realtime. To test, I just did a comand like this from inside domainU: "ls /etc > /root/etclist", and created a "etclist" in "/root". Then I supposed that from domain0, in a mounted "/mnt" above, I could see the new file created as "/mnt/root/etclist", but I was disappointed not to see anything at all.

So clearly everything made changed inside domainU cannot be seen from outside (domain0). Anybody can please explain to me why, and if possible, how could I watch data of domainU (in realtime) from domain0?

Thank you a lot,
AQ

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl

#1 lore raw
Quoted 5 lines

So clearly everything made changed inside domainU cannot be seen from outside (domain0).
Anybody can please explain to me why, and if
possible, how could I watch data of domainU (in realtime) from domain0?

The DomU will be caching the updates to its disk in memory before writing them to the disk. Likewise, Dom0 will be caching data it's read and assuming it stays the same (most filesystems assume only one writer, so dom0 thinks it knows when the disk is modified).

The result of this is that dom0 won't immediately notice the changes domU has made. When it does notice, it'll likely take the form of an error along the lines of "Something changed on this filesystem that I wasn't expecting."

As Ian says, the GFS and OCFSv2 filesystems are explicitly aware of concurrent access so they'll cope with this OK.

The easiest solution for your purposes would be to use NFS root in the domU (with the root FS exported from dom0) or to run an NFS server in the domU and export the root FS to dom0.

HTH,
Mark

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl