Created attachment 13153 [details] samba logs at level 10 While trying to restore previous versions via Windows from shares with GlusterFS backend, already available matching snapshots are not getting listed in 'Previous versions' tab. Following is the GlusterFS share section from smb.conf: vfs objects = shadow_copy2 glusterfs glusterfs:volume = fashion glusterfs:logfile = /var/log/samba/glusterfs-fashion.%M.log glusterfs:loglevel = 9 shadow:snapdir = /.snaps shadow:basedir = / shadow:sort = desc shadow:sscanf = no shadow:snapprefix = ^s[a-z0-9]* shadow:format = _GMT-%Y.%m.%d-%H.%M.%S path = / read only = no guest ok = yes Following log entry confirms that matching GlusterFS snapshots are found with the above shadow_copy2 configuration: [2017/04/11 05:35:21.055621, 10, pid=15814, effective(0, 0), real(0, 0)] ../source3/modules/vfs_shadow_copy2.c:1908(shadow_copy2_snapshot_to_gmt) shadow_copy2_snapshot_to_gmt: match _GMT-%Y.%m.%d-%H.%M.%S: snap2_GMT-2017.04.10-07.40.00 See attachment for details on following suspected error entries in logs during an attempt to restore previous versions of a directory named '2' present directly under root of the share by right-clicking on the folder-> "Restore Previous versions": [2017/04/11 05:35:21.061838, 10, pid=15814, effective(0, 0), real(0, 0)] ../source3/modules/vfs_shadow_copy2.c:730(shadow_copy2_strip_snapshot_internal) ../source3/modules/vfs_shadow_copy2.c:730: path '/2' doesn't start with cwd '/ . . . [2017/04/11 05:35:21.126502, 5, pid=15814, effective(0, 0), real(0, 0)] ../source3/smbd/filename.c:913(unix_convert) Intermediate not found @GMT-2017.04.10-07.40.00 . . . [2017/04/11 05:35:21.126626, 10, pid=15814, effective(0, 0), real(0, 0)] ../source3/smbd/filename.c:1596(filename_convert_internal) filename_convert_internal: unix_convert failed for name 2/@GMT-2017.04.10-07.40.00 with NT_STATUS_OBJECT_PATH_NOT_FOUND [2017/04/11 05:35:21.126669, 3, pid=15814, effective(0, 0), real(0, 0)] ../source3/smbd/smb2_server.c:3097(smbd_smb2_request_error_ex) smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_OBJECT_PATH_NOT_FOUND] || at ../source3/smbd/smb2_create.c:293 [2017/04/11 05:35:21.126697, 10, pid=15814, effective(0, 0), real(0, 0)] ../source3/smbd/smb2_server.c:2988(smbd_smb2_request_done_ex) smbd_smb2_request_done_ex: idx[1] status[NT_STATUS_OBJECT_PATH_NOT_FOUND] body[8] dyn[yes:1] at ../source3/smbd/smb2_server.c:3145
Created attachment 13165 [details] git-am fix for 4.6.next, 4.5.next. Cherry-pick from master. Hopefully this explains what to do next time to get a back-port Anoop. Jeremy.
Reassiging to Karolin for inclusion in 4.5 and 4.6
(In reply to Jeremy Allison from comment #1) Yeah.. I should have done the cherry-picks and attached to bug. Will keep that in mind. Thanks for taking care of it now.
Pushed to autobuild-v4-{6,5}-test after adding bug info.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!