Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cifs mount problem on debian 10 #190

Open
ruchidhore12 opened this issue Mar 6, 2020 · 1 comment
Open

cifs mount problem on debian 10 #190

ruchidhore12 opened this issue Mar 6, 2020 · 1 comment

Comments

@ruchidhore12
Copy link

ruchidhore12 commented Mar 6, 2020

Hi,

I recently followed the steps for debain 10 from: http://netshare.containx.io/docs/getting-started#installation

$ wget https://github.com/ContainX/docker-volume-netshare/releases/download/v0.35/docker-volume-netshare_0.35_amd64.deb
$ sudo dpkg -i docker-volume-netshare_0.35_amd64.deb

Modified the startup options like this for cifs:

## CIFS
DKV_NETSHARE_OPTS="cifs --netrc=/root/"

Added required credentials in /root/.netrc file:

machine IP_address/folder_name
username ****
password ****
domain ****

Launched the plugin by running this in root in:
sudo docker-volume-netshare cifs --verbose

Running docker-compose.yml using docker stack deploy:

service:
   image: image
   restart: always
   volumes:
    - "cifs-test-share:path of mount:ro"

volumes:
cifs-test-share:
  driver: cifs
  driver_opts:
   share: IP_address/folder_name

My docker container does not go up and says:
"starting container failed: error while mounting volume '': VolumeDriver.Mount: exit status 32"

And in the plugin window I get this:

2020/03/06 13:40:36 Entering go-plugins-helpers getPath
DEBU[7445] Entering Get: &{dc_cifs-test-share}
DEBU[7445] Get: mount found for dc_cifs-test-share, host directory: /var/lib/docker-volumes/netshare/cifs/dc_cifs-test-share
2020/03/06 13:40:37 Entering go-plugins-helpers getPath
DEBU[7445] Entering Get: &{dc_cifs-test-share}
DEBU[7445] Get: mount found for dc_cifs-test-share, host directory: /var/lib/docker-volumes/netshare/cifs/dc_cifs-test-share
2020/03/06 13:40:41 Entering go-plugins-helpers getPath
DEBU[7450] Entering Get: &{dc_cifs-test-share}
DEBU[7450] Get: mount found for dc_cifs-test-share, host directory: /var/lib/docker-volumes/netshare/cifs/dc_cifs-test-share
2020/03/06 13:40:41 Entering go-plugins-helpers mountPath
INFO[7450] Mount: dc_cifs-test-share, ID: ****
INFO[7450] Mounting CIFS volume //IP_address/folder_name on /var/lib/docker-volumes/netshare/cifs/dc_cifs-test-share
DEBU[7450] GetCreds: host=IP_address, netrc=&{/root/.netrc [0xc4202e2cc0] []}
DEBU[7450] Executing: mount -t cifs -o guest,rw //IP_address/folder_name /var/lib/docker-volumes/netshare/cifs/dc_cifs-test-share

2020/03/06 13:40:41 mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Is it not able to use the credentials from the file?
Searching for this on google (mount error(95): Operation not supported) I see version option (vers=3.02) needs to be specified. There is no documentation on how to specify it?

@gkluoe
Copy link

gkluoe commented Apr 17, 2020

Hi, I spent a while last night fighting with this in Ubuntu 18.4 but it works now. In your netrc file, have you tried removing share_name from the machine specification? I think it only matches on the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants