I recently was trying out a GlusterFS replicated volume on a couple of Ubuntu 14.04.3 LTS VMs, and it was a complete failure. After mounting the new volume, I could add small numbers of files, but when I dropped 25 files into it getting a directory listing via ls would blow up with an error:
ls: reading directory .: Input/output error
Nothing was in the error logs, heals wouldn’t find anything wrong, the files in the bricks looked fine, and I could actually still read the files and remove them through the mount, just not ls them. If I deleted five of them, the ls would suddenly start working. Turns out this was a known bug in GlusterFS (redhat bug 1089934) related to using it with 32-bit (i386) systems. It is fixed in later versions of Gluster but if you want to stick with just what is in the basic package of Ubuntu LTS (version 3.4.2) there is a workaround: mount the file system with “-o use-readdirp=no”, and that turns off the problematic functionality in FUSE.
sudo mount -t glusterfs -o use-readdirp=no japigl1:/gv0 /mnt/gv0
Now ls and everything else works as expected.