Can't mount md(4) in jail?

Hi,
I'm trying to mount an memory disk inside a jail, Here's my configure
/etc/jail.conf

Code:
j1 {
    exec.start="/bin/sh /etc/rc";
    exec.stop="/bin/sh /etc/rc.shutdown";
    exe.clean;
    mount.devfs;
    ip.address="192.168.64.6";
    enforce_statfs = 0;
    allow.mount;
    allow.mount.tmpfs;
    allow.mount.zfs;
   devfs_ruleset = 5;
}

and the /etc/devfs.conf
Code:
[devfsrules_j1=5]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path 'bpf*' unhide


and in jail $ sysctl security.jail gives me:
Code:
security.jail.mount_tmpfs_allowed: 1
security.jail.mount_procfs_allowed: 0
security.jail.mount_zfs_allowed: 1
security.jail.mount_devfs_allowed: 1
security.jail.devfs_ruleset: 7
security.jail.enforce_statfs: 0
security.jail.mount_allowed: 1
security.jail.jailed: 1

which seems correct to me then I'm trying to make a md based ufs
Code:
# mdconfig -s 10m -u md0
# mdconfig -l
md0
#newfs /dev/md0
/dev/md0: 10.0MB (20480 sectors) block size 32768, fragment size 4096
    using 4 cylinder groups of 2.53MB, 81 blks, 384 inodes.
super-block backups (for fsck_ffs -b #) at:
192, 5376, 10560, 15744
#mount /dev/md0 /mnt/disk1

then I got an error:
Code:
mount: /dev/md0: Operation not permitted

any suggestions?
 
Not saying it will solve your problem but one thing I notice right off the bat is in your /etc/jail.conf you have
Code:
devfs_ruleset=7;

But in
/etc/devfs.conf you have
Code:
[devfsrules_j1=5]
 
Back
Top