[OmniOS-discuss] About block disk devices in lx-branded zone

Илья Кулагин kiv at kiv.pp.ru
Wed Dec 21 09:47:18 UTC 2016


Hi all.

Unfortunately, I cannot read C code, especially in kernel sources.

If anybody knows and can confirm or deny, please reply with your opinion
- is this some kind of my error or desired/supported behaviour.

I've just created centos 6 zone and, additionally to usual config, add
there 2 raw disk devices:
====
add device
set match=/dev/rdsk/vol0
end
add device
set match=/dev/rdsk/vol1
end
====

Both these are in fact ZVOLs (but created manually by `mknod` inside
/dev/rdsk - because zoneadm only allows device nodes from /dev
filesystem to pass into zone):
====
root at omnios:/root# ls -lL /dev/rdsk/vol* /dev/zvol/dsk/rpool/vol*
brw-r--r-- 1 root root 268, 3 Dec 21 15:05 /dev/rdsk/vol0
brw-r--r-- 1 root root 268, 4 Dec 21 14:25 /dev/rdsk/vol1
brw------- 1 root sys  268, 3 Dec 21 14:24 /dev/zvol/dsk/rpool/vol0
brw------- 1 root sys  268, 4 Dec 21 14:24 /dev/zvol/dsk/rpool/vol1
====

From inside zone I can dd from and to these devices:

====
[root at centos ~]# dd if=/dev/urandom of=/dev/rdsk/vol0 bs=1024k count=64
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 10.0342 s, 6.7 MB/s
[root at centos ~]# dd if=/dev/rdsk/vol0 of=/dev/rdsk/vol1 bs=1024k
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 436.127 s, 24.6 MB/s
====

Then I compare these ZVOLs content visible from global zone with dump
visible in lx zone - `diff` says nothing.
`zpool scrub` in global zone also is happy.

It seems that I can use block disk devices in lx-branded zone - as I can
do it in native zones. But is this really so?

-- 
С уважением, Илья Кулагин


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3808 bytes
Desc: Firma criptogr��fica S/MIME
URL: <https://omniosce.org/ml-archive/attachments/20161221/3675fd63/attachment-0001.bin>


More information about the OmniOS-discuss mailing list