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-users

RE: [Xen-users] forcing disk in read only also if mounted

To: "Javier Guerra" <javier@xxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] forcing disk in read only also if mounted
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Tue, 16 Jan 2007 13:28:57 +0100
Delivery-date: Tue, 16 Jan 2007 04:28:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200701160703.13065.javier@xxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acc5ZgilRll2a47qSouEqBOlVt/6aAAApADg
Thread-topic: [Xen-users] forcing disk in read only also if mounted
> i think you beleive that somehow making an exception for 
> Dom0, letting it 
> write 'sometimes' is still 'almost safe'.  it is not.

Consider the following:
You have a module that drives some hardware that is not that frequently
accessed. The OS has loaded the necessary parts of the module to
initialize it. You then rebuild your modules to get a new kernel (say),
and suddenly some part of this module is needed, but since it's been
rebuilt with a different kernel, block number six of the file is not at
all the same as the previous driver (because the driver has been
modified between versions of kernels, or you changed some options in the
config which moves some data around in some kernel data structures, just
to give a few examples). That would be pretty bad, right? [I don't know
if modules are demand loaded - maybe they are all loaded as a big
chunk]. 

Applications for certain are demand loaded, so if you have some
application (such as gcc, Apache server or whatever), then the above
scenario would certainly apply!

Or, just the case that the file is in a completely different place on
the disk, but the data-structure for the directory is cached in the
guest domain, so it just blindly picks up the block that is in the
cached data structure - because it doesn't expect anything to change. 

Here's an idea:
Whenever you build a new version of modules (or whatever shared files
you care to have), you create a new directory to build them in:

/libv001/modules
/libv002/modules
Etc, etc. 
Then create a link /lib/modules -> /libv001/modules that is used for the
currently running domains. When you next decide to restart your domains,
you change the link to point to the new set of modules. 

--
Mats



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users