Jerry Jelinek wrote:
> Ethan Quach wrote:
>   
>> Jerry,
>>
>> I just tripped over this case with the new dataset layout bits.
>> If some alternate boot environment (that contains copies of the
>> zones in the current boot environment) is mounted, then booting
>> a zone fails with:
>>
>> # zoneadm -z z2 boot
>> zone 'z2': Error: error mounting zone root dataset.
>> zone 'z2':
>> zoneadm: zone 'z2': call to zoneadmd failed
>> #
>>
>>
>> I think its the same issue I ran into in 4041
>> http://defect.opensolaris.org/bz/show_bug.cgi?id=4041
>>
>> zoneadm[d] needs to mount the zone's root using the -O
>> option so that the pre-existing lofs mount that's there for
>> that zone's zonepath for the mounted alternate boot
>> environment overlays this mount.
>>     
>
> Ethan,
>
> That sounds like a fundamental bug in the way beadm
> handles mounts.  Using an overlay mount is not the
> correct solution since that would imply that actions on
> the mounted BE would be seeing the current BE's zone
> datasets and not the datasets for the mounted BE. 

After looking at this further, I agree that overlay mounting this
doesn't seem right either.  I think it may be a bug in mount.

> I think it is a bug for BE mounting to re-use the
> current BE's zone mountpoints.  Those should be
> disjoint.
>   

I don't believe we are re-useing the current BE's zone mountpoints.
When loopback mounting anything from the current BE, we always
use the -o nosub option so that nothing subordinate to what we're
actually loopback mounting gets seen by the alternate root.

The current BE mounts its zone root dataset at

    /zones/z2/root

whereas the mounted BE mounts its zone root dataset at

    /a/zones/z2/root


/a/zones/z2 is loopback mounted from /zones/z2, but since we mount
that with the -o nosub option, /a/zones/z2/root does not see what's
mounted at /zones/z2/root

So the alternate BE does not see the zone root there for the current
BE and vice versa.



The difference for this case though is that the alternate BE is mounted
before the zone in the current BE is mounted.  So we have

    /a/zones/z2   loopback mounted from /zones/z2 (with -o nosub)


and the alternate BE's zone root already mounted at

    /a/zones/z2/root


Now when the zone in the current BE boots, its trying to get its
root dataset mounted at

    /zones/z2/root


but that fails with 'device busy' presumably because it's parent
directory, /zones/z2, is loopback mounted on /a/zones/z2, and
/a/zones/z2/root is mounted with another device.

But since the parent directory was loopback mounted with -o nosub,
it actually seems that the mount that's being done here should just
work without -O; but its not working (maybe this is a bug in mount).

I'll look into this further...


(btw, mounting /zones/z2/root with -O didn't affect what was already
mounted and seen at /a/zones/z2/root)


thanks,
-ethan

> Jerry
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>   

Reply via email to