Sarah,
Thanks for reviewing. I tested the scenarios which you mentioned.
Please find the test report attached. Please let me know if you have
any more scenarios in mind.
Also note that I am yet to run SUNWstc-libbe test suite. Also,
testing needs to be done over x86. Will do these things within a
couple of days.
Thanks you,
-Sriman
On 05/18/10 19:09, Sarah Jelinek wrote:
Hi Sriman,
No comments on the code at this time, however I think your testing is
insufficient. I would like to see the following types of zone configs
tested:
-delegated datasets from the from global zone into non-global zone
-clone or snapshots of datasets in the zone
-configure zone to mount a dataset, not created under zone root dataset
Any other configurations that can affect this bug. There are lots of
ways zones can be configured with zfs datasets, in particular with
children datasets that are mounted in be_mount_one_zone, and I want to
be sure that more complex configurations are tested as well.
thanks,
sarah
*****
On 05/17/10 07:59 AM, sriman narayana bhavanam - Sun Microsystems -
Bangalore India wrote:
Hi,
Could you please review my changes to fix CR 10318 and let me know your
comments.
Webrev :
http://jurassic.eng/net/v4u-1500a-gmp03.uk/export/home/caiman-10318/webrev/
Bug report : https://defect.opensolaris.org/bz/show_bug.cgi?id=10318
Testing done:
----------------
Created following datasets and set their mountpoint properties as below:
rpool/zones - /zones
rpool/zones/zone1 - /zones/zone1
rpool/zone2 - /zone2
Now, configured two non-global zones zone1 and zone2 with zone paths
/zones/zone1 and /zone2
respectively.
Created boot environment new_be, and mounted it.
#beadm create new_be
#beadm mount new_be /a
#mount -p | grep /a
j...@v4v-machine-b11-gmp03:/# mount -p|grep /a
rpool/ROOT/new_be - /a zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones - /a/zones lofs - no ro,nosub
/zones/zone1 - /a/zones/zone1 lofs - no ro,nosub
rpool/zones/zone1/ROOT/zbe-1 - /a/zones/zone1/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zone2 - /a/zone2 lofs - no ro,nosub
rpool/zone2/ROOT/zbe-1 - /a/zone2/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
It can be observed that only file systems required for non-global zone
paths are loopback mounted under alternate root.
Regards,
-Sriman
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
Created following datasets and set their mountpoint properties as indicated
below:
rpool/zones - /zones
rpool/zones/zone1- /zones/zone1
rpool/zone2 - /zone2
rpool/zones/zone3 - /zones/zone3
Configured and installed following non-global zones. zone name and associated
zone path are
listed below:
zone1 - /zones/zone1
zone2 - /zone2
zone3 -/zones/zone3
Executed following test scenarios. Please not that new_be is destroyed after
each scenario and created
again.
(i) Create an alternate BE and mount it
#beadm create new_be
#BE_PRINT_ERR=true beadm mount new_be /a
#j...@v4v-machine-b11-gmp03:/# mount -p|grep /a
rpool/ROOT/new_be - /a zfs - no rw,devices,setuid,nonbmand,exec,xattr,atime
/zones - /a/zones lofs - no ro,nosub
/zones/zone1 - /a/zones/zone1 lofs - no ro,nosub
rpool/zones/zone1/ROOT/zbe-1 - /a/zones/zone1/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zone2 - /a/zone2 lofs - no ro,nosub
rpool/zone2/ROOT/zbe-1 - /a/zone2/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones/zone3 - /a/zones/zone3 lofs - no ro,nosub
rpool/zones/zone3/ROOT/zbe-1 - /a/zones/zone3/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
Observations : Only the shared datasets in zone path hierarchy got mounted
under /a (which is expected)
(ii) Configure a fs inside zone using 'zonecfg ... add fs', create BE, mount it
j...@v4v-machine-b11-gmp03:/# zfs create rpool/data
j...@v4v-machine-b11-gmp03:/# zfs set mountpoint=legacy rpool/data
j...@v4v-machine-b11-gmp03:/# zonecfg -z zone1
zonecfg:zone1> add fs
zonecfg:zone1:fs> set dir=/data
zonecfg:zone1:fs> set special=rpool/data
zonecfg:zone1:fs> set type=zfs
zonecfg:zone1:fs> end
zonecfg:zone1> commit
zonecfg:zone1> verify
zonecfg:zone1> exit
j...@v4v-machine-b11-gmp03:/#
j...@v4v-machine-b11-gmp03:/# beadm create new_be
j...@v4v-machine-b11-gmp03:/# BE_PRINT_ERR=true beadm mount new_be /a
j...@v4v-machine-b11-gmp03:/# mount -p|grep /a
rpool/ROOT/new_be - /a zfs - no rw,devices,setuid,nonbmand,exec,xattr,atime
/zones - /a/zones lofs - no ro,nosub
/zones/zone1 - /a/zones/zone1 lofs - no ro,nosub
rpool/zones/zone1/ROOT/zbe-1 - /a/zones/zone1/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zone2 - /a/zone2 lofs - no ro,nosub
rpool/zone2/ROOT/zbe-1 - /a/zone2/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones/zone3 - /a/zones/zone3 lofs - no ro,nosub
rpool/zones/zone3/ROOT/zbe-1 - /a/zones/zone3/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
Observations : /zones/zone1/root/data is not lofs mounted under /a.
The same scenario when executed witout current fix,
following error message comes
loopback_mount_shared_fs: failed to loopback mount
/zones/zone1/root/data at /a/zones/zone1/root/data: No such file or directory
So, an attempt is made to mount the above dataset as part of
mounting all shared datasets. But, it failed bacause mount is attempted
in wrong order.
(iii) Add a dataset (which is not under zone root dataset) to zone using
'zonecfg ... add dataset', create BE, mount it
j...@v4v-machine-b11-gmp03:/# zfs create rpool/zone_private
j...@v4v-machine-b11-gmp03:/# zonecfg -z zone1
zonecfg:zone1> add dataset
zonecfg:zone1:dataset> set name=rpool/zone_private
zonecfg:zone1:dataset> end
zonecfg:zone1> commit
zonecfg:zone1> verify
zonecfg:zone1> exit
j...@v4v-machine-b11-gmp03:/# zfs set mountpoint=legacy rpool/zone_private
j...@v4v-machine-b11-gmp03:/# beadm create new_be
j...@v4v-machine-b11-gmp03:/# BE_PRINT_ERR=true beadm mount new_be /a
j...@v4v-machine-b11-gmp03:/# mount -p | grep /a
rpool/ROOT/new_be - /a zfs - no rw,devices,setuid,nonbmand,exec,xattr,atime
/zones - /a/zones lofs - no ro,nosub
/zones/zone1 - /a/zones/zone1 lofs - no ro,nosub
rpool/zones/zone1/ROOT/zbe-1 - /a/zones/zone1/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zone2 - /a/zone2 lofs - no ro,nosub
rpool/zone2/ROOT/zbe-1 - /a/zone2/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones/zone3 - /a/zones/zone3 lofs - no ro,nosub
rpool/zones/zone3/ROOT/zbe-1 - /a/zones/zone3/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
Observations : rpool/zone_private is neighther nor lofs mounted under /a.
Behavour is same even without fix.
(iv) Create a child dataset under zone root dataset, create BE, mount it.
j...@v4v-machine-b11-gmp03:/# zfs create
rpool/zones/zone1/ROOT/zbe/child_ds
j...@v4v-machine-b11-gmp03:/#beadm create new_be
j...@v4v-machine-b11-gmp03:/# BE_PRINT_ERR=true beadm mount new_be /a
be_mount_callback: no entry for rpool/zones/zone1/ROOT/zbe-1/child_ds in
vfstab, skipping ...
Observations : child_ds got cloned as part of 'beadm create'. But,
mounting of clone under
/a got skipped for lack of entry for lagacy dataset in
/etc/vfstab
(v) this scenario is same as (iv), with the addition that /etc/vfstab entry is
made for child dataset
in non-global zone's /etc/vfstab
j...@v4v-machine-b11-gmp03:/# BE_PRINT_ERR=true beadm mount new_be /a
j...@v4v-machine-b11-gmp03:/# BE_PRINT_ERR=true beadm mount new_be /a
j...@v4v-machine-b11-gmp03:/# mount -p|grep /a
rpool/ROOT/new_be - /a zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones - /a/zones lofs - no ro,nosub
/zones/zone1 - /a/zones/zone1 lofs - no ro,nosub
rpool/zones/zone1/ROOT/zbe-1 - /a/zones/zone1/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
rpool/zones/zone1/ROOT/zbe-1/child_ds - /a/zones/zone1/root/child_mnt zfs
- no rw,devices,setuid,nonbmand,exec,xattr,atime
/zone2 - /a/zone2 lofs - no ro,nosub
rpool/zone2/ROOT/zbe-1 - /a/zone2/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones/zone3 - /a/zones/zone3 lofs - no ro,nosub
rpool/zones/zone3/ROOT/zbe-1 - /a/zones/zone3/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
Observations : child_ds got cloned as part of 'beadm create'. This time,
clone got mounted under /a at /a/zones/zone1/root/child_mnt
(vi) Same as scenarios (iv) and (v), execpt that the mountpoint property of
child_ds is set to something other
than legacy
j...@v4v-machine-b11-gmp03:/#zlogin zone1
j...@v4v-machine-b11-gmp03:/#zfs set mountpoint=/child_ds
rpool/zones/zone1/ROOT/zbe/child_ds
[ctrl -d]
r...@zone1:~# logout
[Connection to zone 'zone1' pts/3 closed]
j...@v4v-machine-b11-gmp03:/#beadm create new_be
j...@v4v-machine-b11-gmp03:/# zfs list |grep child_ds
rpool/zones/zone1/ROOT/zbe/child_ds 19K 12.5G 19K /child_ds
j...@v4v-machine-b11-gmp03:/#BE_PRINT_ERR=true beadm mount new_be /a
j...@v4v-machine-b11-gmp03:/# mount -p|grep /a
rpool/ROOT/new_be - /a zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones - /a/zones lofs - no ro,nosub
/zones/zone1 - /a/zones/zone1 lofs - no ro,nosub
rpool/zones/zone1/ROOT/zbe-1 - /a/zones/zone1/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zone2 - /a/zone2 lofs - no ro,nosub
rpool/zone2/ROOT/zbe-1 - /a/zone2/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
/zones/zone3 - /a/zones/zone3 lofs - no ro,nosub
rpool/zones/zone3/ROOT/zbe-1 - /a/zones/zone3/root zfs - no
rw,devices,setuid,nonbmand,exec,xattr,atime
j...@v4v-machine-b11-gmp03:/#
Observations : child_ds is not even cloned as part of 'beadm create'. So,
there is no question of mounting it.
Same is the behaviour without fix.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss