[Gluster-users] Can not rename(move) a file in java.io.tmpDir to a mounted gluster volume

ssdf dfdfd kkyspy at gmail.com
Sun May 24 03:31:41 UTC 2015


gluster version: 3.6.2 from ppa:gluster/glusterfs-3.6
os: ubuntu 14.04

The gluster volume is mounted at '/nfs_gluster'. A jave http server
takes uploaded files in directory '/tmp' and rename (move) them to a
subdirectory in the volume at '/nfs_gluster/data'. Here is the java
code

UPLOADED_FILE.renameTo(new File('/nfs_gluster/data', NEW_FILE_NAME);

The java program runs without any error or exception, but no file was
moved: there was nothing in '/nfs_gluster/data'.

However, if I set java to use a tmp directory that is also part of the
mounted volume, everything works as expected: the uploaded files was
moved to '/nfs_gluster'. ie,

System.set("java.io.tmpDir", "/nfs_gluster")

make everything work.

I believe this is a bug, probably relate to

http://www.gluster.org/pipermail/gluster-users.old/2015-January/020194.html

Cheers
David


More information about the Gluster-users mailing list