+++ This bug was initially created as a clone of Bug #1501235 +++
+++ This bug was initially created as a clone of Bug #1500816 +++
Description of problem:
Mounting an activated snapshot to a client by giving the command "mount -t glusterfs 10.70.42.243:/snaps/test0/bravo /mnt/test0/" fails.
Here, test0 is the snapshot name and bravo is the volume name
Info of the volume:
[root@dhcp42-243 ~]# gluster v info
Volume Name: bravo
Volume ID: 575514e1-fd58-4205-a418-d551a3463280
Snapshot Count: 254
Number of Bricks: 2 x 3 = 6
Output of the mount command:
[root@dhcp43-240 ~]# mount -t glusterfs 10.70.42.243:/snaps/test0/bravo /mnt/test0/
Mount failed. Please check the log file for more details.
Version-Release number of selected component (if applicable):
How reproducible: 2/2
Steps to Reproduce:
1. Create and start a volume.
2. Mount the volume on a client and do some I/O's at the mount point.
3. Create a snapshot and activate it.
4. Mount the snapshot on client using the command "mount -t glusterfs <node ip>:/snaps/<snapname>/<volname> /mnt/<mountname>"
Mount fails with output : Mount failed. Please check the log file for more details.
Should be mounted successfully.
Output of the log file from the failed mount is attached.
Looking at the log file it seems that the issue is related to the subdir mount.
--- Additional comment from Worker Ant on 2017-10-12 05:08:52 EDT ---
REVIEW: https://review.gluster.org/18506 (mount/fuse : Fix parsing of vol_id for snapshot volume) posted (#1) for review on master by mohammed rafi kc (email@example.com)
REVIEW: https://review.gluster.org/18507 (mount/fuse : Fix parsing of vol_id for snapshot volume) posted (#1) for review on release-3.12 by mohammed rafi kc (firstname.lastname@example.org)
REVIEW: https://review.gluster.org/18507 (mount/fuse : Fix parsing of vol_id for snapshot volume) posted (#2) for review on release-3.12 by mohammed rafi kc (email@example.com)
COMMIT: https://review.gluster.org/18507 committed in release-3.12 by jiffin tony Thottan (firstname.lastname@example.org)
Author: Mohammed Rafi KC <email@example.com>
Date: Thu Oct 12 14:31:14 2017 +0530
mount/fuse : Fix parsing of vol_id for snapshot volume
For supporting sub-dir mount, we changed the volid. Which means anything
after a '/' in volume_id will be considered as sub-dir path.
But snapshot volume has vol_id stracture of /snaps/<volname>/<snapname>
which has to be considered as during the parsing.
Note 1: sub-dir mount is not supported on snapshot volume
Note 2: With sub-dir mount changes brick based mount for quota cannot be
executed via mount command. It has to be a direct call via glusterfs
>Signed-off-by: Mohammed Rafi KC <firstname.lastname@example.org>
Signed-off-by: Mohammed Rafi KC <email@example.com>
(cherry picked from commit 067f38063e13fc75d4e3f7adf93441d15099c557)
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-glusterfs-3.12.3, please open a new bug report.
glusterfs-glusterfs-3.12.3 has been announced on the Gluster mailinglists , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.