Jump to content

[DEPRECATED] Auto add vfs objects = btrfs to SMB shares using a btrfs filesystem

Featured Replies

Posted

Adding vfs objects = btrfs to a btrfs formatted SMB share allows copy-on-write (i.e. instant) copies to be done using windows explorer (on windows 8/server2012 or newer) using Samba's server side copy functionality, obviously as long as the copy is done on the same filesystem, e.g., from cache to cache, disk1 to disk1, etc, this would allow for example to very quickly and easily backup a vdisk before any significant change without dropping to the CLI.

 

Alternatively allow the user to add specific vfs objects to any share using the GUI.

Very interesting! Tell me please how to implement this on the current version

  • Author

You can use it by adding btrfs to vfs objects on /etc/samba/smb-shares.conf for the share you want to use it then restart Samba:

samba restart

You'll need to redo it every time you start/stop the array, since it will default to the previous setting.

Will user script help? Can it work together with vfs objects = recycle ?

I have Recycle-bin plugin installed, will this affect?

Both lines will be ok? ??

vfs objects = recycle

vfs objects = btrfs

 

PS: Or to add in one line?

vfs objects = recycle btrfs

Edited by vanes

  • Author
49 minutes ago, vanes said:

PS: Or to add in one line?

vfs objects = recycle btrfs

I believe this is the correct one, but never used multiple options

  • 3 years later...
On 7/20/2018 at 4:01 PM, JorgeB said:

Adding vfs objects = btrfs to a btrfs formatted SMB share allows copy-on-write

Alternatively allow the user to add specific vfs objects to any share using the GUI.

Is it possible to add the option(s) mentioned above?

Actually I tried to add "vfs objects = btrfs" into /etc/samba/smb-shares.conf than restart samba but this functionality still not working...

On ubuntu it works perfect without any issue for example. Why it doesn't work on unRAID?

  • Author
16 hours ago, navhawk said:

Actually I tried to add "vfs objects = btrfs" into /etc/samba/smb-shares.conf than restart samba but this functionality still not working...

I found after posting this that with Unraid it only works for disk shares, it won't for user shares, likely because of FUSE, I still use it on a cache disk share.

3 hours ago, JorgeB said:

I found after posting this that with Unraid it only works for disk shares, it won't for user shares, likely because of FUSE, I still use it on a cache disk share.

Hi. I've just find out that in last unraid 6.10.0-rc2 version this function works as I would like. So if you copy file(s) between share(s) on one physical disk using samba it will not require any additional space by default and it's going very fast. EXCELLENT. :)))))) Thanks for the developers they realized this functionalities of btrfs.

Edited by navhawk

  • Author
On 11/21/2021 at 12:04 PM, navhawk said:

I've just find out that in last unraid 6.10.0-rc2 version this function works as I would like.

Thanks, I see that now it also works with user shares, but to be honest I don't think it's something LT changed, most likely some kernel/FUSE change that now allows for that to work with user shares.

  • 5 months later...
  • Author

This is no longer needed, as of at least Unraid v6.10-rc4 and later included Samba supports reflinks over SMB by default (for XFS also), and note that as of now (Unraid v6.10.0-rc7) and due to an apparent Samba bug any copy to a share with this enable done using server side copy will crash Samba.

  • JorgeB changed the title to [DEPRECATED] Auto add vfs objects = btrfs to SMB shares using a btrfs filesystem

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...