[Lxc-users] Mounting filesystem for container
Serge E. Hallyn
serge.hallyn at canonical.com
Fri Sep 17 21:56:45 UTC 2010
Quoting lxc at jelmail.com (lxc at jelmail.com):
> Hi, I just tried to mount a filesystem in a container and I got this:
>
> [root ~]# lxc-start -n mycontainer
> lxc-start: Operation not permitted - failed to mount '/dev/sdd1' on
> '/srv/lxc/mycontainer/mnt'
> lxc-start: failed to setup the mounts for 'mycontainer'
> lxc-start: failed to setup the container
> lxc-start: invalid sequence number 1. expected 2
> lxc-start: failed to spawn 'mycontainer'
> [root ~]#
>
> What I did was put this in /etc/lxc/mycontainer.fstab:
>
> /dev/sdd1 /srv/lxc/mycontainer/mnt ext3 defaults 0 1
>
> Container boots file without that line. Does this mean I can't mount a
> filesystem that is for this container, and only for this container ?
>
> I did this on OpenVZ without issue.
Probably the devices cgroup preventing you the access. In
/var/lib/lxc/mycontainer/config you'll want to add access
usin ga lxc.cgroup.devices.allow statement
More information about the lxc-users
mailing list