I have successfully mounted ubifs on a partition on the host side using “ubiattach /dev/ubi_ctrl -m 15; mount -t ubifs /dev/ubi0_0 /mnt”. But I cannot mount ubifs on a partition in LXC. When I use “ubiattach /dev/ubi_ctrl -m 15”, I get the following error.
ubiattach: error!: cannot attach mtd15
error 1 (Operation not permitted)
My configuration of LXC as follows.
lxc.cap.keep = sys_admin net_raw net_admin setuid setgid sys_time
lxc.mount.entry = /dev/mtd15 dev/mtd15 none bind,optional,create=file 0 0
lxc.mount.entry = /dev/mtdblock15 dev/mtdblock15 none bind,optional,create=file 0 0
lxc.mount.entry = /dev/ubi_ctrl dev/ubi_ctrl none bind,create=file 0 0
lxc.cgroup.devices.allow = c 10:* rwm
lxc.cgroup.devices.allow = b 31:* rwm
lxc.cgroup.devices.allow = c 90:* rwm
I have checked the node access permissions and LXC capabilities, but for the time being I haven’t found anything wrong. Can anyone point out my problem?