[Lxc-users] Mount to NFS fails in containers fstab, but succeeds in the host & guest OS's
David Parks
davidparks21 at yahoo.com
Thu Apr 18 11:08:25 UTC 2013
On the host OS, this NFS command works:
mount -t nfs4 -o rw,intr,timeo=600,port=2051 10.1.3.67:/ /mnt/hdfs
That same mount works from within the container (the container is set to
unconfined so it can perform mounts).
When I try to add this mount to the fstab file of the container it fails:
root at atlas01:/var/lib/lxc# cat testsandboxa01/fstab
proc proc proc nodev,noexec,nosuid 0 0
sysfs sys sysfs defaults 0 0
10.1.3.67:/ /var/lib/lxc/testsandboxa01/rootfs/mnt/hdfs nfs4
rw,intr,timeo=600,port=2051 0 0
Try to start the container and we get:
root at atlas01:/var/lib/lxc# lxc-start -n testsandboxa01
lxc-start: Invalid argument - failed to mount '10.1.3.67:/' on
'/usr/lib/x86_64-linux-gnu/lxc//mnt/hdfs'
lxc-start: failed to setup the mounts for 'testsandboxa01'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'testsandboxa01'
Also, can I unmounts & remount the containers fstab entries without
restarting the container? As a workaround to the above I mounted NFS on the
host and mounted that directory into the container. But now I've run into an
NFS problem that requires an unmounts/remount, which I did on the host, but
the container appears to need the same, and shutting down the services it
runs to restart isn't good.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130418/82f3dac5/attachment.html>
More information about the lxc-users
mailing list