Gluster part 2

Note that the pull request is for gluster branch. More detailed info in commit messages.