# [OmniOS-discuss] zvol devices not seen in child (non-global) zones

gate03 at landcroft.co.uk gate03 at landcroft.co.uk
Sun Jan 13 20:19:18 EST 2013

- Previous message: [OmniOS-discuss] snapshot and rollback of volume
- Next message: [OmniOS-discuss] Some problems with luxadm?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Hello;  I'm trying to use some raw storage in a non-global zone, as a VirtualBox disk image.  However, although I believe I'm following the correct procedure, the storage is not seen.

    First, confirm that 'zfs create -V 15G rpool/vol/Gentoo1' did its work:
    	root at world:~# ls -l /dev/zvol/dsk/rpool/vol/Gentoo1 /dev/zvol/rdsk/rpool/vol/Gentoo1
    	lrwxrwxrwx 1 root root 0 Jan  9 12:31 /dev/zvol/dsk/rpool/vol/Gentoo1 -> ../../../../..//devices/pseudo/zfs at 0:41
    	lrwxrwxrwx 1 root root 0 Jan  9 12:31 /dev/zvol/rdsk/rpool/vol/Gentoo1 -> ../../../../..//devices/pseudo/zfs at 0:41,raw
    	root at world:~# ls -Ll /dev/zvol/dsk/rpool/vol/Gentoo1 /dev/zvol/rdsk/rpool/vol/Gentoo1
    	brw------- 1 573 100 170, 41 Jan  9 12:39 /dev/zvol/dsk/rpool/vol/Gentoo1
    	crw------- 1 573 100 170, 41 Jan  9 12:39 /dev/zvol/rdsk/rpool/vol/Gentoo1

    So the volume is there.  I chowned it to 'me' (573:100) in the child zone but it makes no difference if they're owned by root.

    Then ensure the zone knows about the zvol:
    	root at world:~# zonecfg -z person export
    	create -b
    	set zonepath=/zone/people
    	set brand=ipkg
    	set autoboot=true
    	set ip-type=shared
    	add fs
    	set dir=/home
    	set special=/home
    	set type=lofs
    	end
    	add net
    	set address=192.168.1.3/24
    	set physical=e1000g0
    	end
    	add net
    	set address=192.168.0.3/24
    	set physical=e1000g1
    	end
    	add device
    	set match=/dev/vboxdrv
    	end
    	add device
    	set match=/dev/zvol/dsk/rpool/vol/Gentoo1
    	end
    	add device
    	set match=/dev/zvol/rdsk/rpool/vol/Gentoo1
    	end

    Ensure that the zone knows about the changes, then login and check:
    	root at world:~# zoneadm -z person reboot
    	root at world:~# zlogin person
    	[Connected to zone 'person' pts/3]
    	Last login: Sun Jan 13 22:56:19 on pts/3
    	OmniOS 5.11	omnios-33fdde4	2012.10.04
    	root at person:~# find /dev/zvol ! -type d
    	root at person:~#

    So what's gone wrong there ?

    Michael.

- Previous message: [OmniOS-discuss] snapshot and rollback of volume
- Next message: [OmniOS-discuss] Some problems with luxadm?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the OmniOS-discuss mailing list