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/
Home Products Support Community News


Re: [Xen-users] Share of disks in read only between dom0 and domU.

To: Goswin von Brederlow <brederlo@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Share of disks in read only between dom0 and domU.
From: Michel Gaudet <Michel.Gaudet@xxxxxxxx>
Date: Thu, 27 Sep 2007 12:07:19 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 01 Oct 2007 09:56:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <87ejgk8ny2.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <46FB61FD.5010709@xxxxxxxx> <87ejgk8ny2.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20061206)
Goswin von Brederlow a écrit :
Michel Gaudet <Michel.Gaudet@xxxxxxxx> writes:

Hello !

Because of a special config of my grub boot system, i try to export in
a domU, in read only mode, one of my disk partition mounted in the
dom0 (in RW)  and i don't succeed because xen refuse to export this
disk partition in a domU.

extract of the conf :

disk = [ 'phy:/dev/sda,ioemu:hda,r' , 'phy:/dev/sda6,ioemu:sda6,r]' ,
'phy:/dev/sda1,ioemu:sda1' ]

The first disk for grub to access the MBR , the second for grub to obtain its 
1.5 and
second stage and the third to reach the guest OS.

I block at the export of the sda6 which is the / of my dom0 with the message :

Error: Device 2054 (vbd) could not be connected.
Device /dev/sda6 is mounted read-write in the privileged domain,
and so cannot be mounted read-only by a guest.

And it has good reason to refuse this.

And as i say belox i understand this.

If i don't mount the /dev/sda6 the domU begin the boot but it freeze with the 
error :

Booting from Hard Disk
GRUB Loading stage1.5.

GRUB loading, please wait...
Error 5

Error 5 is : Partition table invalid or corrupt

But we can boot normally our 2 OS without xen.

You need sda there, not sda6. There is no partition table on sda6.

Yes the partition is on /dev/sda which is mounted also; but grub stage 1.5 and 2 are on /dev/sda6 and grub access its stage > 1 thru the file system onto it is installed then i think i do mount /dev/sda6 which contain the grub stage > 1.

I think it is because it don't see the partition onto which is the grub install 
: /dev/sda6

I understand why it is forbidden to mount in RW the same disk but in R ?

Because the filesystem structures will be in some inconsistent state
and change underneath the caches the domU maintains without
notice. You quickly get a mix of old and new data.

For grub this might not matter as it is so low level but xen doesn't
know you only want to start grub there.




   ^  ^ ----           Michel GAUDET          +--- |  | +--- +--- +---
  /| /||    |            CRI/SIR              |__  |__| |__  |__  |__
 / |/ ||  __      Ecole des Hautes Etudes     |    |  | |       |    |
/     ||____|       en Sciences Sociales      +--- |  | +--- ---+ ---+
              54 Boulevard RASPAIL 75006 PARIS
    Tel:(33) 01 49 54 25 91           Email: Michel.Gaudet@xxxxxxxx
    FAX:(33) 01 49 54 26 85

Xen-users mailing list

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