vfs_shadow_copy2 configuration

Dan Cohen1 DANCOH at il.ibm.com
Sun Sep 8 18:01:28 CEST 2013


Hi Michael,

I had another issue with shadow copy2: even when using relative paths 
restoring of files from the snapshots failed. 
Windows was giving me error messages like this one: "Could not find this 
item, This is no longer located in 
\\<machine_name>\<share_name>\<share_name>. Verify item's location and try 
again". Obviously the second <share_name> in the giving path is needless. 
I started to investigate it and kind of arrived to a dead end. So I 
decided to take your branch with your work on shadow copy2 vfs to see if 
it solves my issues and to give you some feedback as you asked me.

The good news are that when eventually I've succeeded to apply your 
changes to vfs_shadow_copy2.c everything worked as expected.
I applied the changes on top of branch based on samba 4.0.4. We use GPFS 
as the file system and I tried two configurations for shadow copy2:
Configuration 1:
shadow:snapdir = <absolute_path_to_snapshot_directory>
shadow:basedir= <our base dir>
shadow:snapdirseverywhere= no

and configuration 2:

shadow:snapdir = .snapshots
shadow:snapdirseverywhere = yes

both configurations worked perfectly, previous versions were presented by 
the windows tab and files/directories were restored correctly from the 
previous versions using the windows interface.
So at least for the configurations I tested your work seems to solve the 
issues, including absolute path issue.

Only problem was that I couldn't really fetch/clone your git repository to 
my host, so I had to manually merge the file vfs_shadow_copy2.c and fix 
some mismatches with my branch (using copy_smb_filename instead of 
cp_smb_filename).
When I'm trying to clone/fetch your branch I'm getting the following error 
message:
-----------------------------------
dancoh at host176:/local/dancoh$ git clone 
http://gitweb.samba.org/obnox/samba/samba-obnox.git
Cloning into 'samba-obnox'...
error: Unable to find bc07864b77e10f1f231f9177ba168c222d0c555d under 
http://gitweb.samba.org/obnox/samba/samba-obnox.git
Cannot obtain needed object bc07864b77e10f1f231f9177ba168c222d0c555d
while processing commit d65db48db51006a766a8f58a53e7c1022e6c630c.
error: Fetch failed. 
-------------------------------------

I tried several times, from several machines,  with no success. Cloning 
the samba.git repository is obviously working fine for me.
Do you have any idea what could be the problem? I guess I'm missing 
something... Should I also clone some other repo?

Thanks,
Dan Cohen
IBM - XIV, Israel
NAS Development Team




From:   Dan Cohen1/Israel/IBM at IBMIL
To:     Michael Adam <obnox at samba.org>, 
Cc:     samba-technical at lists.samba.org
Date:   22/08/2013 15:09
Subject:        Re: vfs_shadow_copy2 configuration
Sent by:        samba-technical-bounces at lists.samba.org



Hi Michael,

Thanks for you answer.
When you have this polished version of the patches I'll be happy to test 
it and give you some feedback (if I'll have anything clever to say...). 
The raw patches as they are now are a bit too messy for me to look/merge 
into my branch. 

Thanks,
Dan




From:   Michael Adam <obnox at samba.org>
To:     Dan Cohen1/Israel/IBM at IBMIL, 
Cc:     samba-technical at lists.samba.org
Date:   22/08/2013 13:17
Subject:        Re: vfs_shadow_copy2 configuration



Hi,

I have recently worked on getting the shadow_copy2
module into shape again for absolute snapdir
and a couple of other things that worked in 3.6.

The raw result of my work is here:

http://gitweb.samba.org/?p=obnox/samba/samba-obnox.git;a=shortlog;h=refs/heads/master-shadow_copy2



This is on top of master, but should apply to 4.0.

The patches are very raw and show the progress when
I approached the solution. They also contain some
cleanup of the code.

I am working on a polished/squashed version of the patches
for pushing upstream and will post this here very soon.

Any testing and feed-back would be highly welcome!

Cheers - Michael


On 2013-08-22 at 12:29 +0300, Dan Cohen1 wrote:
> Hi,
> 
> I had some problems with vfs_shadow_copy2 where I couldn't see my 
> snapshots in the windows "Restore previous versions"  tab.
> After some debugging I realized that the shadow:snapdir parameter does 
not 
> support absolute paths anymore. 
> I saw this post 
https://lists.samba.org/archive/samba/2013-May/173098.html 
> regarding this issue but this still raise the question: is this a bug or 


> is it an intended behavior? 
> I couldn't find any ticket regarding this issue in the bugzila and this 
is 
> not documented in the man page or in the code. Actually the comment in 
the 
> head of the vfs_shadow_copy2.c file still states that absolute paths are 


> supported with shadow:snapdir. 
> Also, in the same matter, after looking at the code it seems  that 
> shadow:basedir is not in use anymore. Again this is not documented. And 
> again my question: is this a bug or is in purpose? (or am I missing 
> something?)
> 
> Thanks,
> Dan Cohen
> IBM - XIV, Israel
> NAS Development Team

[attachment "signature.asc" deleted by Dan Cohen1/Israel/IBM] 


More information about the samba-technical mailing list