[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] modifying file-systems in Dom0 while mounted read-only in DomU


  • To: "Reinhard Brandstädter" <reinhard.brandstaedter@xxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
  • From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
  • Date: Tue, 27 Mar 2007 15:17:21 +0200
  • Delivery-date: Tue, 27 Mar 2007 06:16:37 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: Acdwbz6qTOSfuyMiR4G5TpE56j2YAgAAh5RA
  • Thread-topic: [Xen-users] modifying file-systems in Dom0 while mounted read-only in DomU

 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Reinhard Brandstädter
> Sent: 27 March 2007 13:55
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] modifying file-systems in Dom0 while 
> mounted read-only in DomU
> 
> Hello,
> 
> I was quite surprised this worked:
> I started two virtual machines that both use the same 
> physical partition 
> residing on a SAN (exported read-only by the Xen configuration).
> While both machines were running I mounted the partition in 
> the Dom0 and 
> changed some files there. These changes were NOT visible in 
> the DomUs, but 
> when I shut down one of the DomUs and started it again with 
> 'xm create' it 
> had the changes, while the other DomU didn't.
> 
> So while it's not possible to create DomUs with disks that 
> are currently 
> mounted in the Dom0, it is possible to mount disks in the 
> Dom0 that are 
> currently in use by a DomU?
> 
> Although this is a nice feature  - in my case these two DomUs 
> are forming a 
> cluster and the common configuration resides on the read-only 
> disk - it seems 
> dangerous to me.
> 
> Although with this feature I could seamless change the 
> configuration of the 
> cluster :-) :
> - mount the partitition in Dom0
> - restart one DomU and let it gain the service with changed 
> configuration
> - restart the second DomU with the new configuration
> 
> Is there a reason why this is possible? Maybe it isn't 
> dangerous at all?

The reason why is simply because the check for "is this already mounted 
elsewhere" is done when the guest being created. Since Dom0 can use the regular 
"mount command", to mount it later on and mount isn't aware complications such 
that Xen introduces to the world, it's allowing you to do it. 

As to the "danger": If the filesystem is mounted read-only by DomU, it's not so 
bad, but if it's a read/write file-system in DomU, then it's definitely bad. 
However, even if it's read-only, you can't know for sure what the DomU is going 
to do with the file-system, and it may well get inconsistant data simply 
because it reads some new data and uses that in conjunction with some data that 
is cached (and since DomU knows it's a read-only file-system, it doesn't need 
to check if the data on disk has changed). This  sort of inconsitant data usage 
can cause all sorts of problems, ranging from bad data used by application(s) 
to system crash or hang. 

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.