Monday, February 25, 2013

sol11 export lofs to sol10 zones

it seems like all i do is work with solaris.  really i don't.

sometimes, for reasons beyond me, solaris 10 zones do not like to have sunstudio directories mounted to them despite being explicitely defined in their zonecfg file.
permissions or something with -b.  whatever.

to see if the mounts will actually work, let's do things the long-handed way.  if they do work, then let's add a vfstab stanza on the global zone box.

1. identify the directory to be mounted from the global zone to the zone.
/opt/SUNWspro

2.  create mount target on non-global zone.
# zlogin solzone
# mkdir -p /opt/SUNWspro

this can also be done on the global zone system:
# mkdir -p /zones/solzone/root/opt/SUNWspro

3.  mount it!  global zone
# mount -o ro -F lofs /mnt/olddisk /zones/ngzname/root/mnt/olddisk

4. Verify mount point is up and running
4a. From global

# mount |grep /opt/SUNWspro
/zones/solzone/root/opt/SUNWspro on /opt/SUNWspro read/write/setuid/devices/rstchown/zone=solzone/nozonemod/sharezone=19/dev=3910002 on Mon Feb 25 11:11:11 2013

4b. From non-global zone

# df -h /mnt/olddisk
/opt/SUNWspro on /opt/SUNWspro read/write/setuid/devices/rstchown/zone=solzone/nozonemod/sharezone=19/dev=3910002 on Mon Feb 25 11:11:11 2013

Super.  Add that vfstab entry.

vfstab entry
/opt/SUNWspro   -       /zones/solzone/root/opt/SUNWspro      lofs    -       yes     -

1 comment:

giaonhanquocte said...

Thanks for sharing, nice post! Post really provice useful information!

Giaonhan247 chuyên dịch vụ mua hàng mỹ từ dịch vụ order hàng mỹ hay nhận mua nước hoa pháp từ website nổi tiếng hàng đầu nước Mỹ mua hàng ebay ship về VN uy tín, giá rẻ.