[lxc-users] Mount additional storage into unprivileged container

Andriy Tovstik andriy.tovstik at gmail.com
Tue Nov 8 12:57:32 UTC 2016


вт, 8 нояб. 2016 г. в 13:57, Andrey Repin <anrdaemon at yandex.ru>:

> Greetings, Andriy Tovstik!
>
> >>> I am learning LXC features because we are going  to implement it in our
> >>> production environment.
> >>
> >>  LXC or LXD? Your configuration smells the latter.
>
> > LXD, you are right. But AFAIK LXD is an extension that was built over LXC
> > subsystem, isn't it?
>
> LXD is an environment by and in itself. It uses different configuration
> tools
> to setup and manage containers.


Ok, lets forget about lxc, lets talking about lxd.


>
> My (overly simplified) explanation of use case is that LXC is what I'd use
> if
> I need to setup a system once and forget (as a figure of speech) it exists,
> while LXD is a tool for mass-deployment of applications/appliances. With
> leaning to the latter, since LXD deploys entire stack in a single
> container.
>

I have big plans :) so LXD looks more suitable for me


> >>> Could somebody explain me is there any well documented way to mount
> >>> additional filesystems or (preferable) block devices into Unprivileged
> >>> containers? is it supports live migration of container?
> >>
> >>  You could do better at explaining, what you need that for. It'll speed
> up the
> >>  answer.
> >>  Normally, you don't need to "mount block devices into container".
>
> > Well... I'm going to use LXD to isolate two applications that will be
> > heavily loaded. May be it will be necessary to give for each other
> dedicated storage.
>
> You can do that by just mounting that dedicated storage in the profile. You
> don't really need block devices inside a container, unless your use case
> demands specifically block-level access.
>

Ok, let me clarify my question. As i've read in
https://github.com/lxc/lxd/blob/master/doc/configuration.md  there are two
storage option can be mounted into container:

disk and unix-block device. I played with the both ones. Lets talk about
disk device. As you can see in my example i've used disk device with a
block device as a source. I can change source option and set directory as a
source. Anyway i recieve "permission denied" error when i try to access to
this directory inside my container... Remember we talk about unprivileged
container. Privileged container works fine. I have found a lot of topics
about this problem, but i'm seeking for official, best practice soluiton.

--
> With best regards,
> Andrey Repin
> Tuesday, November 8, 2016 14:25:33
>
> Sorry for my terrible english...
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
WBR, Andriy Tovstik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161108/47c872c5/attachment.html>


More information about the lxc-users mailing list