[lxc-users] LXD - Small Production Deployment - Storage

Tomasz Chmielewski mangoo at wpkg.org
Wed Mar 29 14:00:20 UTC 2017


On 2017-03-29 22:47, Marat Khalili wrote:
>> Just don't use NFS clients using NFS server on the same machine (same 
>> kernel), as this will break (hangs).
> Huh? Works for me between LXC containers. Only had to tune
> startup/shutdown sequence in systemd. In what exactly situation does
> it hang? /worried/

Kernel deadlocks.

Note that you can have NFS client on machineA and NFS server on machineB 
- this is fine, it's two different kernels.

NFS client on machineA, and KVM guest with NFS server also on machineA 
is fine, too - two different kernels.


NFS client on machineA and NFS server on machineA, same kernel (as is 
the case with LXD) - will eventually deadlock.

The whole machine will not freeze out of the sudden, but you will notice 
you have more and more processes in D state, which you're not able to 
kill.


See for example:

https://lwn.net/Articles/595652/

It could be something improved in newer kernels, but I'm not aware of 
that.


If you need to export NFS-like mounts on the same server, you can use 
gluster mount, which is userspace - and which has poor performance, not 
really suitable for containers, but should be OK for i.e. large files 
accessed directly (no recursive find etc.).


Tomasz Chmielewski
https://lxadm.com


More information about the lxc-users mailing list