Mount zvol in jail: Operation Not Permitted

Status
Not open for further replies.

dontocsata

Cadet
Joined
Aug 8, 2016
Messages
2
Hi all. I'm just trying to mount a freshly created zvol inside of a jail. I am running FreeNAS-9.10.2-U2 (e1497f2).

So in the WebUI, I created the zvol at /mnt/tank/test_zvol, size 10 GiB.
In the jail I am running:
[root@zvol_test /]# mkdir /tmp/test

[root@zvol_test /]# newfs /dev/zvol/tank/test_zvol
/dev/zvol/tank/test_zvol: 10240.0MB (20971520 sectors) block size 32768, fragment size 4096
using 17 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
super-block backups (for fsck_ffs -b #) at:
192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032

[root@zvol_test /]# mount -r -v /dev/zvol/tank/test_zvol /tmp/test/
mount: /dev/zvol/tank/test_zvol: Operation not permitted
tank/jails/zvol_test on / (zfs, local, nfsv4acls)


I tried setting the tunable 'vfs.zfs.vol.mode' to 0, 1, or 2 (based on this thread: https://forums.freenas.org/index.php?threads/unable-to-mount-zvol.23203/) and recreating the zvol each time. The zvol device doesn't exist in the jail with 0, but I get the same 'Operation not permitted' for either 1 or 2.

Any advice?
 

dontocsata

Cadet
Joined
Aug 8, 2016
Messages
2
Does it let you to add it as a storage using the GUI?
Hi dlavigne,

The zvol doesn't appear in the tree, but if I type it in manually, the WebUI accepts that. And it appears to work on the jail itself.

Is this the expected method to "mount" zvols in jails? What if the zvol is formatted to a different filesystem (such as ext4 or NTFS for a VM for example), will the jail be able to read it using this mount method?
 
Last edited:
D

dlavigne

Guest
Is this the expected method to "mount" zvols in jails? What if the zvol is formatted to a different filesystem (such as ext4 or NTFS for a VM for example), will the jail be able to read it using this mount method?

Yes, it is the expected method. AFAIK, the filesystem does not make a difference but would be interested to hear if you find out otherwise.
 
Status
Not open for further replies.
Top