[lxc-users] Mount Directory or Move Image Location?

B G bg85305 at gmail.com
Fri Oct 30 22:11:27 UTC 2015


BTW - the reason I am looking at mounting directories under the rootfs of
the containers is that I have a large slow storage array for big data and a
much smaller fast NVME PCI device for fast data processing and I want to
use them both in the same container.

On Fri, Oct 30, 2015 at 3:04 PM, B G <bg85305 at gmail.com> wrote:

>
> Thanks Serge.
>
> You suggest to bind mount the underlying directory from the host OS?
>
> I suppose that we could do that for the root file system anywhere inside
> the image file system?
>
> E.g.
>
> /var/lib/lxd/containers/container-name/rootfs/directory_mount
>
> Once I restart the container should be transparent to the container that
> the underlying file-system has mounted from a different location?
>
> That sound right... I was thinking about it in a much more complicated way
> like you would a VDI for a VM.  That is better.
>
>
>
> On Fri, Oct 30, 2015 at 2:23 PM, Serge Hallyn <serge.hallyn at ubuntu.com>
> wrote:
>
>> Quoting B G (bg85305 at gmail.com):
>> > I need to jam a ton of data from another drive partition into a
>> > container... What is the best way to:
>> >
>> > 1. Mount a directory from a different drive on the host
>> >
>> > or
>> >
>> > 2. Change the image location to the alternative drive on the host
>> >
>> > I have been searching a ton and can't see the best way to do this.  I
>> have
>> > an NVME partition that I want to use for really fast IO but it is not
>> the
>> > default one the containers are created in...
>> >
>> > Appreciate any advice..
>>
>> Are you using lxd or lxc?
>>
>> The easiest way is probably to just bind mount the fast directory onto
>> /var/lib/lxc or /var/lib/lxd.  If I'm understanding you right.
>>
>> Personally on my laptop I have a little 16G m.2 ssd formatted as btrfs
>> and mounted onto /var/lib/lxd to give me something like .5-second
>> container
>> creations.
>>
>> -serge
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151030/97a243e2/attachment-0001.html>


More information about the lxc-users mailing list