Description of problem: ====================== Unable to cd to .snaps after restoring a volume to snapshot after directories were deleted and recreated Version-Release number of selected component (if applicable): ============================================================= glusterfs 3.6.0.30 How reproducible: ================ always Steps to Reproduce: ================== 1.Create a 2x2 dist-rep volume and start it 2.Fuse and NFS mount the volume 3.Enable USS on the volume 4.From fuse mount, create fuse_dir1 and files under them (fuse1..5) From NFS mount, create dir1 and files under them (nfs1..5) 5.Take a snapshot of the volume (snap1) 6.Create more files under fuse_dir1 (fuse6..10) and (nfs6..10) under dir1 7.Take another snapshot of the volume (snap2) 8. cd to .snaps from the directories and list the snaps 9.Delete directories fuse_dir1 and dir1 and recreate them with same name and create some files under them (newfuse1..5 and newnfs1..5) 10.Take another snapshot of the volume (snap3) 11.Restore the volume to snap2 12.Now cd to .snaps. It fails with error : [root@dhcp-0-97 dir1]# cd .snaps bash: cd: .snaps: No such file or directory Actual results: =============== Restoring a volume to snap which had the deleted directories and trying to access .snaps fails Expected results: ================ After restoring volume to a snap which had the deleted directories, user should be able to cd .snaps Additional info:
sosreport: ======== http://rhsqe-repo.lab.eng.blr.redhat.com/bugs_necessary_info/snapshots/uss/1161531/
There are two scenarios here: Scenario-A) 1. Create a directory 'xyz' 2. Create a snapshot 'snap1' 3. Delete directory 'xyz' 4. Create a new directory with the same name 'xyz' 5. Now cd to '/mnt/xyz/.snaps' will fail, because xyz is not part of any snapshot Even though the directory with the same name xyz exists in snapshot snap1, from the file-system point of view both are different. This is a valid Scenario and can be documented. Scenario-B) 1. Create a directory 'xyz' 2. Create snapshots 'snap1' and 'snap2' 3. Delete directory 'xyz' 4. Create another snapshot 'snap3' 5. Now restore the volume to 'snap2' 6. cd to '/mnt/xyz/.snaps' will fail. directory xyz exists in older snapshot snap1, but still it fails. Because uss checks is the directory exists in the latest snapshot, which is not found in snap3 and it fails. This is a bug. This needs to be fixed.
Patch submitted upstream: https://code.engineering.redhat.com/gerrit/37954
Version :glusterfs 3.6.0.38 ======== Retried the steps as mentioned in 'Description' unable to reproduce the issue. Marking the bug as 'Verified'
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0038.html