When a fuse filesystem is mounted via the mount command, the environment variables are not passed to the fuse script. Why?
I am trying to mount hdfs (hadoop file system) via fuse.
This is easy on the command line:
# Short example version: LD_LIBRARY_PATH=blah hadoop-fuse-dfs -onotrash dfs://ambari:8020 /mnt/hdfsfuse # Actual version with full path for completeness LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/hadoop/yarn/local/filecache/11/mapreduce.tar.gz/hadoop/lib/native /usr/hdp/188.8.131.52-1245/hadoop/bin/hadoop-fuse-dfs -onotrash dfs://ambari:8020 /mnt/hdfsfuse
This is all and well, but if I put the definition of the FS in /etc/fstab to then use the mount command, I end up with:
fuse_dfs: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
Looking at the hadoop-fuse-dfs script and adding debug output, I see that LD_LIBRARY_PATH is seen as empty in this script (this is true both if I export LD_LIBRARY_PATH first or if I add it at the start of the command)
hdp 2.5, centos 7
Short of rewriting the mount script to hardcode LD_LIBRARY_PATH, how can I have environment variables in general passed via mount?