ContainX / docker-volume-netshare

Docker NFS, AWS EFS, Ceph & Samba/CIFS Volume Plugin
http://netshare.containx.io
Apache License 2.0
1.12k stars 164 forks source link

unable to mount cifs share #181

Closed x1um1n closed 5 years ago

x1um1n commented 5 years ago

hey folks, I'm trying to create a volume from a cifs share, but for some reason netshare is trying to mount it using a docker 'hostname' as opposed to the actual name of the box:

x1um1n@omnius:~$ docker run -it --dns=8.8.8.8 --volume-driver=cifs -v seurom/Media:/Media plexinc/pms-docker bash
docker: Error response from daemon: VolumeDriver.Mount: exit status 1.
INFO[0153] Mount: 62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560, ID: 589049f82ab088274cdfefa5ec3a88a5a6b4fe5abb7f8d650faaecae54aadad0
INFO[0153] Mounting CIFS volume //62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560 on /var/lib/docker-volumes/netshare/cifs/62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560
DEBU[0153] GetCreds: host=62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560, netrc=&{/home/x1um1n/.netrc [0xc420318210] []}
DEBU[0153] Executing: mount -t cifs -o vers=1.0,noperm,fileMode=0777,dirMode=0777,guest,sec=ntlm,rw //62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560 /var/lib/docker-volumes/netshare/cifs/62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560
2019/06/15 19:07:51 mount error: could not resolve address for 62bb276888b9529cc919aaea35402cb91987308a35535b2d6c3dc46ae7b1e560: Unknown error

I had this working earlier this evening, then I put a fresh install on my media server, with the intention of building a nice clean dockerised setup, but now it won't work I'm running docker-volume-netshare 0.36, on ubuntu 18.04, with docker installed from snap

Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.4
 Git commit:        e68fc7a
 Built:             Tue May  7 17:57:34 2019
 OS/Arch:           linux/amd64
 Experimental:      false
Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       e68fc7a
  Built:            Tue May  7 17:57:34 2019
  OS/Arch:          linux/amd64
  Experimental:     false
x1um1n commented 5 years ago

To rule out any weirdness from the snap install, as the test I did before wiping my server used a .deb install of docker, I've removed the snap and re-installed through apt, but get the same error :(

Client:
 Version:           18.09.5
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        e8ff056
 Built:             Thu May  9 23:11:19 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.5
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       e8ff056
  Built:            Thu May  9 22:59:19 2019
  OS/Arch:          linux/amd64
  Experimental:     false
x1um1n commented 5 years ago

nevermind, the problem was with the fileMode & dirMode options

for anyone else stuck down this same rabbithole, I found that out by tailing /var/log/kern.log whilst attempting to start the container...