Hi Serge,
please, can you give more details about your settings of root owned
unprivileged container with LVM backend? Indeed, I encounter the same
problem as Andrea. I have tried to set the container as you explain but
it fails to run...
root # grep lxc.id_map /var/lib/lxc/test/config
lxc.id_map = u 0 558752 65536
lxc.id_map = g 0 558752 65536
root # grep root /etc/sub[ug]id
/etc/subgid:root:558752:65536
/etc/subuid:root:558752:65536
root # lxc-start -n test
lxc-start: failed to determine fs type for '/dev/Pool/test'
lxc-start: failed to determine fs type for '/dev/dm-7'
lxc-start: failed to mount rootfs
lxc-start: failed to setup rootfs for 'test'
lxc-start: Error setting up rootfs mount after spawn
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'test'
lxc-start: The container failed to start.
lxc-start: Additional information can be obtained by setting the
--logfile and --logpriority options.
I use the download template with a Debian Wheezy 64 for this container.
Thanks,
Xavier
Le 25/01/2015 01:11, Serge Hallyn a écrit :
Yes, unprivileged users cannot manipulate the lvm devices on the host.
You can still use user namespaces though. I have a few containers on my main
server which do that. They each run in a unique uid range, but are started by
root, so that they can use lvm (actually luks-encrypted lvm) backends.
Just add the lxc.id_map lines as per usual to containers which are owned by
root. And make sure to allocate the ranges to root in /etc/sub[ug]id.
-serge
Quoting Andrea Masi ([email protected]):
The problem seems related to unprivileged containers that seems cannot work
with -B lvm.
Must we assume that lvm backed store (and maybe others) actually cannot
work with unprivileged containers?
2015-01-23 17:02 GMT+01:00 Andrea Masi <[email protected]>:
Hi,
I'm using lxc 1.0.6 on ubuntu 14.04.
I've no problems creating/running on dir backing store but when I use lvm
I cannot start containers getting these errors:
lxc-start 1422026234.562 ERROR bdev - failed to determine fs type for
'/dev/lxc/lvm-cont'
lxc-start 1422026234.563 ERROR lxc_conf - failed to determine fs type
for '/dev/dm-0'
lxc-start 1422026234.564 ERROR lxc_conf - failed to mount rootfs
lxc-start 1422026234.564 ERROR lxc_conf - failed to setup rootfs for
'lvm-cont'
lxc-start 1422026234.565 ERROR lxc_conf - Error setting up rootfs mount
after spawn
lxc-start 1422026234.565 ERROR lxc_start - failed to setup the container
lxc-start 1422026234.566 ERROR lxc_sync - invalid sequence number 1.
expected 2
lxc-start 1422026234.566 ERROR lxc_start - failed to spawn 'lvm-cont'
lxc-start 1422026234.574 ERROR lxc_start_ui - The container failed to
start.
lxc-start 1422026234.575 ERROR lxc_start_ui - Additional information
can be obtained by setting the --logfile and --logpriority options.
I've tried different template createds with -t download for example:
lxc-create -t download -n lvm-cont -B lvm -- -d ubuntu -r utopic -a amd64
I can manually mount with no problem /dev/lxc/lvm-cont
Any idea on what can it be wrong?
Thanks.
--
www.eraclitux.com
--
www.eraclitux.com
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users