gdal-docker icon indicating copy to clipboard operation
gdal-docker copied to clipboard

Cannot open files via host mounted Network File System volume.

Open Ouwen opened this issue 7 years ago • 1 comments
trafficstars

I am trying to run this volume mounted docker container on top of a host which has an NFS. However, whenever I use the python gdal.Open command on a file that exists, it will hang indefinitely.

Here are the commands to reproduce the issue using amazon EFS

  1. Spin up a machine and mount the EFS file system.
mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 <your-fs-id>.efs.<your-region.amazonaws.com:/ /mnt/efs
  1. Run the container and mount the NFS volume
sudo docker run -it -v /mnt/efs:/mnt/efs geodata/gdal /bin/bash
  1. Run the gdal.Open command in python
from osgeo import gdal
gdal.Open("/mnt/efs/<file>")

Interestingly I can run os level commands on files in the EFS no problem. For example if I copy the /mnt/efs/<file> into a local directory. The gdal command works fine on the local file.

Ouwen avatar Mar 17 '18 18:03 Ouwen

I have a similar issue When I run gdal on a file in /root/volume which is a folder mounted as a docker volume from the root filesystem gdal fails with ERROR 4 When i move that file to /tmp the gdla commands work

JohanMollevik avatar Nov 19 '18 08:11 JohanMollevik