vfs module shadow_copy breaks recycle

Status
Not open for further replies.

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
I have a zfs volume I am sharing via cifs. The recycle bin is activated on this share.

This volume has a periodic snapshot task setup, and I'd like to allow my user to browse those snapshots (eg: \\Machine\Share\.zfs\snapshots\...)

However, to allow access to the .zfs dir, I need to specify that I want the vfs module shadow_copy. Hence, in auxiliary parameters, I add:

EDITED: modules => objects
Code:
vfs objects = shadow_copy


This works, but once activated, the recycle bin ceases to work. My guess is that my "vfs modules" overides an internal "vfs modules = recycle". The workaround I found was to not check "export" recycle bin, but to re-create the functionality by hand inside auxiliary parameters.

Would you consider this a bug? Maybe there should be an "auxiliary modules" box?

Also, looking at how the samba config files are created, it would appear there is some kind of switch to activate the shadow_copy, but I have not found anything in the UI.

Is there a plan to add "export snapshots" or something?

Did I understand nothing and am I doing this all wrong?
 
G

gcooper

Guest
I have a zfs volume I am sharing via cifs. The recycle bin is activated on this share.

This volume has a periodic snapshot task setup, and I'd like to allow my user to browse those snapshots (eg: \\Machine\Share\.zfs\snapshots\...)

However, to allow access to the .zfs dir, I need to specify that I want the vfs module shadow_copy. Hence, in auxiliary parameters, I add:

Code:
vfs modules = shadow_copy


This works, but once activated, the recycle bin ceases to work. My guess is that my "vfs modules" overides an internal "vfs modules = recycle". The workaround I found was to not check "export" recycle bin, but to re-create the functionality by hand inside auxiliary parameters.

Would you consider this a bug? Maybe there should be an "auxiliary modules" box?

Also, looking at how the samba config files are created, it would appear there is some kind of switch to activate the shadow_copy, but I have not found anything in the UI.

Is there a plan to add "export snapshots" or something?

Did I understand nothing and am I doing this all wrong?

Can you please provide more details, e.g. your "Save Debug" output?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
I can't really give you a debug output because:
a) I don't know how to
b) There isn't really any "event" I can show.

But I can give you my exact config:

Case 1:
Config 1.jpg Result 1.jpg
Here, I checked export recycle bin. The recycle bin works correctly, but /.zfs is not accessible

Case 2:
Config 2.jpg Result 2.png
Here, I added the shadow_copy module, but the recycle bin does not work anymore (things aren't moved into it)

Case 3:
Config 3.jpg
With this final config, I unchecked export recycle bin, and put recycle into the vfs objects by hand. In that case, everything works.

----
I'd file a bug report, as my understanding is that I added a module, and it broke the recycle bin. I'm not sure however if I'm doing things correctly.
Please advise.
 
G

gcooper

Guest
I can't really give you a debug output because:
a) I don't know how to
b) There isn't really any "event" I can show.

But I can give you my exact config:

Case 1:
View attachment 644 View attachment 647
Here, I checked export recycle bin. The recycle bin works correctly, but /.zfs is not accessible

Case 2:
View attachment 645 View attachment 648
Here, I added the shadow_copy module, but the recycle bin does not work anymore (things aren't moved into it)

Case 3:
View attachment 646
With this final config, I unchecked export recycle bin, and put recycle into the vfs objects by hand. In that case, everything works.

----
I'd file a bug report, as my understanding is that I added a module, and it broke the recycle bin. I'm not sure however if I'm doing things correctly.
Please advise.

Please go to System -> Advanced -> Save Debug. Unfortunately the screenshots you included above are too small to be usable.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
I apologize for my newbieness. Those pics were originally png's, that were compressed with png out. I didn't them expect to get jpg'ed.

I am not in front of my machine, but I'll will provide a full debug ASAP.

I'd have more questions (especially about shadow_copy2), but I think I'll wait until I can provide my debug info.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Full log

OK, here is the full overview, along with my intents, in case I am being stupid.

Goal: Be able to browse my .zfs folders from within windows explorer (I don't care much for the actual shadow copy mechanism, just browse). By default, windows can not explore through them.
Solution: Adding "vfs objects = shadow_copy" to my share auxiliary parameters. Once this is set, windows can explore through them .\zfs.
Problem: The recycle bin seizes to work.

My config for my pools and share is:
"Bethrezen" Pool //Share here with shadow_copy only
+"BSF" Volume with snapshots I want to browse
+"Old" Volume

"E***e" Pool //Share here with shadow_copy only
+"BSF" Volume //with snapshots I want to browse
+"Old" Volume

"Gungnir" Pool //Share here with both shadow_copy and export recyle bin.
+"h******l" Volume //with snapshots I want to browse
+"E***e" Volume //with snapshots I want to browse

"Sleipnir" Pool
+"BSF" Volume //Share here directly with both shadow_copy and export recyle bin.

The log files are attached to ticket #1296.
 
G

gcooper

Guest
OK, here is the full overview, along with my intents, in case I am being stupid.

Goal: Be able to browse my .zfs folders from within windows explorer (I don't care much for the actual shadow copy mechanism, just browse). By default, windows can not explore through them.
Solution: Adding "vfs objects = shadow_copy" to my share auxiliary parameters. Once this is set, windows can explore through them .\zfs.
Problem: The recycle bin seizes to work.

My config for my pools and share is:
"Bethrezen" Pool //Share here with shadow_copy only
+"BSF" Volume with snapshots I want to browse
+"Old" Volume

"E***e" Pool //Share here with shadow_copy only
+"BSF" Volume //with snapshots I want to browse
+"Old" Volume

"Gungnir" Pool //Share here with both shadow_copy and export recyle bin.
+"h******l" Volume //with snapshots I want to browse
+"E***e" Volume //with snapshots I want to browse

"Sleipnir" Pool
+"BSF" Volume //Share here directly with both shadow_copy and export recyle bin.

The log files are attached to ticket #1296.

Ok, now it makes sense why things are "broken". What you did is explicitly set vfs objects instead of following the supported method, as described in the docs: http://doc.freenas.org/index.php/Windows_(CIFS)_Shares#Configuring_Shadow_Copies . If you go this route you must set 'vfs objects = recycle shadow_copy2'.

I'll reduce the severity of the ticket and note why. I wish this functionality could be simply enabled with a checkbox, etc but it requires some magic to parse the date strings.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Please forgive me for breaking things and wasting your time for it. I have a linux machine on my network, and I just wanted to be able to browse .zfs directly :(

I decided to go back to your suggestion, as described on the wiki, since I do have a some shares the linux box isn't supposed to access anyways. I followed the instructions exactly as they are described (my setup is similar anyways: 1 volume with 2 datasets):

-I am sharing a dataset, with windows ACL activated, and a periodic snapshot task activated. There are only periodic snapshots on the volume. I just created the share afterwards. I did not add anything to the auxiliary parameters (this time).
-My windows machines (got a 7 Pro, and an XP Home) both show the previous versions pane, but neither show any snapshots...

I don't understand what I'm doing wrong... Any idea what might be causing this?
 
G

gcooper

Guest
Please forgive me for breaking things and wasting your time for it. I have a linux machine on my network, and I just wanted to be able to browse .zfs directly :(

I decided to go back to your suggestion, as described on the wiki, since I do have a some shares the linux box isn't supposed to access anyways. I followed the instructions exactly as they are described (my setup is similar anyways: 1 volume with 2 datasets):

-I am sharing a dataset, with windows ACL activated, and a periodic snapshot task activated. There are only periodic snapshots on the volume. I just created the share afterwards. I did not add anything to the auxiliary parameters (this time).
-My windows machines (got a 7 Pro, and an XP Home) both show the previous versions pane, but neither show any snapshots...

I don't understand what I'm doing wrong... Any idea what might be causing this?

Are you using 8.0.3? If so, then previous versions was broken in that version (please see the errata notes for more details). It was fixed in 8.0.4, which was officially released last night.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Thanks a lot

Thanks you for your time and support.

I had found a few threads mentioning breakage with shadow_copy for a particular version, but I always find it presumptions to place blame on your tools, rather than your own incompetence...

Would it be OK if I update the wiki with a warning about that particular issue?

----
If we ignore the fact that I was doing shadow volumes wrong, if I were to want to deploy any other vfs object that is not directly supported by the FreenasGUI, say "audit", "netatalk", or whatever. This would require the auxiliary parameters to contain the line "vfs objects = audit". That would also break the recycle bin, and the shadow_volume... wouldn't it?

If I'm still not mistaken, this would also be solved by my original recommendation of "auxiliary objects"? Which would allow adding custom vfs modules, without breaking the Freenas supplied ones.
 
G

gcooper

Guest
Thanks you for your time and support.

No problem!

I had found a few threads mentioning breakage with shadow_copy for a particular version, but I always find it presumptions to place blame on your tools, rather than your own incompetence...

Would it be OK if I update the wiki with a warning about that particular issue?

Well, that's kind of what the release notes do, but I'll check with Dru to see what she thinks about adding a note for that.

----
If we ignore the fact that I was doing shadow volumes wrong, if I were to want to deploy any other vfs object that is not directly supported by the FreenasGUI, say "audit", "netatalk", or whatever. This would require the auxiliary parameters to contain the line "vfs objects = audit". That would also break the recycle bin, and the shadow_volume... wouldn't it?

If I'm still not mistaken, this would also be solved by my original recommendation of "auxiliary objects"? Which would allow adding custom vfs modules, without breaking the Freenas supplied ones.

I think you have a really good point and that should be added to the ticket (a request to add that field as an advanced field).

Thanks for the feedback :)!
 
J

James

Guest
This type of information really belongs in the release notes (or in a searchable place such as these forums) as the wiki is for developing upcoming versions of the documentation and for providing links to already published, version-specific documentation. If we know about a bug ahead of time, it can definitely be included in that version's documentation. However, it does not make sense to refer to previous version's bugs in an upcoming doc version where that bug no longer applies.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
This type of information really belongs in the release notes (or in a searchable place such as these forums) as the wiki is for developing upcoming versions of the documentation and for providing links to already published, version-specific documentation. If we know about a bug ahead of time, it can definitely be included in that version's documentation. However, it does not make sense to refer to previous version's bugs in an upcoming doc version where that bug no longer applies.

I thought 8.0.3 was the latest version. So your are correct, no need to document it.

----
I installed 8.0.4, and I can now see previous versions in the windows explorer! Great! ...
That is, I can see the previous version of folders... Files don't seem to have any previous versions... Is this... "Normal"?

Clarification: I can access previous version of files via the folders, but when I right click on files directly, the "previous version" pane shows up as empty.
 
Status
Not open for further replies.
Top