[OmniOS-discuss] preservation of permissions and ownership of zvols in child zone
Michael Mounteney
gate03 at landcroft.co.uk
Thu Feb 7 19:02:29 EST 2013
The way that zvols work in child zones is a bit counter-intuitive, it seems to me, or counter to my intuition at least.
A while ago I posted a message that it simply wasn't working. That is, if your zonecfg has:
add device
set match=/dev/zvol/dsk/rpool/vol/Gentoo1
end
where that matches:
zfs create -V 15G rpool/vol/Gentoo1
then inside the zone:
# ls -l /dev/zvol/dsk/rpool/vol
matches nothing. But if instead:
# ls -l /dev/zvol/dsk/rpool/vol/Gentoo1
then the volume appears. However, defeat is snatched from the jaws of victory because I want this volume for a VirtualBox file system, so in the global zone:
# chown 573:100 /dev/zvol/dsk/rpool/vol/Gentoo1
however, in the child zone:
# ls -l /dev/zvol/dsk/rpool/vol/Gentoo1
brw------- 1 root sys 95, 3 Feb 7 23:48 /dev/zvol/dsk/rpool/vol/Gentoo1
that is, ownership somehow is lost. You can chown again in the child zone and it works but the ownership is lost when the child zone is rebooted. All of the foregoing about chown applies to chmod. This matter is discussed in
http://www.archivum.info/openindiana-discuss@openindiana.org/2012-10/00257/%28OpenIndiana-discuss%29-ZVOL-%28et-al%29-device-node-access-rights.html
but there is no conclusion, yet. I wonder if a bodge-fix is to write a service that chmods the zvols on boot, and if so, what would the manifest be ? I have no experience of writing manifests.
--
Michael Mounteney <gate03 at landcroft.co.uk>
More information about the OmniOS-discuss
mailing list