<div dir="ltr">I feel quite silly, but it seems that the `gdal.Open` was actually opening the file from the docker mounted NFS, just very slowly. I left it to run for 2 minutes or so and it returned.<br><br>But this is weird behavior because on the host a `*Dataset` was returned instantly, and within the docker container running `cp /mnt/efs/<my_geo.tiff> <docker_local_dir` is also instant. The 2min latency seems to only occur within a docker mounted network filesystem for the `gdal.Open` command.<br><br>Some other findings, the `/mnt/efs/` directory i'm using has several files (100k+). When I move the geotiff under a new directory within EFS (`mnt/efs/test`), the `gdal.Open` command is instant within the docker container.<br><br>Is there a reason why `gdal.Open` is slow for a cluttered directory but unix `cp` is not?<br></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Mar 18, 2018 at 2:51 AM Ouwen Huang <<a href="mailto:ouwen.oh@gmail.com">ouwen.oh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hey Michael,<br><br>Thanks for the quick response, I've been bashing my head against this for a while.</div>Unfortunately restarting the docker daemon did not work for me. I can access the EFS from within docker using regular unix commands like `cp`, and `cat`, even with GDAL `<span style="color:rgb(33,33,33)">VSIFOpenL` and `</span><span style="color:rgb(33,33,33)">VSIFReadL`. However, `gdal.Open` will just hang without giving an error or returning.</span><div><font color="#212121"><br></font></div><div>I'm using the following mount command from amazon EFS if this helps debug anything:<br>`sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 <fs-id>.efs.us-west-2.amazonaws.com:/ /mnt/efs`<font color="#212121"><br></font></div><div><br></div><div><font color="#212121">I'm glad that you have a working version of this though, this had worked for me in the past but I did not keep track of my versioning.</font></div><div><font color="#212121"><br></font>What host os version, docker version and gdal version are you using?<br><br>- Ouwen</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Mar 18, 2018 at 2:31 AM Michael Smith <<a href="mailto:michael.smith.erdc@gmail.com" target="_blank">michael.smith.erdc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you restarted the docker daemon after mounting the EFS drive to the local OS? If not, do that and then map the volume with -v. That worked for me.<br>
<br>
Michael Smith<br>
Remote Sensing/GIS Center<br>
US Army Corps of Engineers<br>
<br>
> On Mar 18, 2018, at 7:15 AM, Ouwen Huang <<a href="mailto:ouwen.oh@gmail.com" target="_blank">ouwen.oh@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I am having some trouble loading a GeoTiff into GDAL from a docker container that is mounting a NFS (specifically amazon EFS). When mounting a volume with the `docker -v` command or mounting the NFS directly into docker under `--privileged` mode. The `gdal.Open` command hangs.<br>
><br>
> I am able to run os level commands to open the GeoTiff of interest from within the docker container. In fact, if I copy from the NFS to a local directory, gdal works fine.<br>
><br>
> I'm trying to understand what might be causing the `gdal.Open` command to hang. I've tested that `VSIFOpenL` and `VSIFReadL` work with the GeoTiff within the docker container so I'm very confused what is happening.<br>
><br>
> I've tried different versions of GDAL (1.10 - 2.3) and differing versions of docker with no luck.<br>
><br>
> Any help would be greatly appreciated!<br>
><br>
> Best,<br>
> Ouwen Huang<br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>-- <br><div dir="ltr" class="m_4540411385431448094gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Duke MD/PhD Candidate<br></div><div>Ycombinator Fellow</div><div>cell: <a href="tel:(210)%20860-3915" value="+12108603915" target="_blank">210.860.3915</a></div><div><a href="http://ouwen.io/" target="_blank">http://ouwen.io/</a></div></div></div></blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Duke MD/PhD Candidate<br></div><div>Ycombinator Fellow</div><div>cell: 210.860.3915</div><div><a href="http://ouwen.io/">http://ouwen.io/</a></div></div></div>