Showing posts with label Samba. Show all posts
Showing posts with label Samba. Show all posts

Monday, October 6, 2014

Samba and Snapper: Previous Versions with Windows Explorer

Snapper is a neat application for managing snapshots atop a Btrfs filesystem.

The upcoming release of Samba 4.2 will offer integration with Snapper, providing the ability to expose snapshots to remote Windows clients using the previous versions feature built into Windows Explorer, as demonstrated in the following video:

The feature can be enabled on a per-share basis in smb.conf, e.g.:
...
[share]
        vfs objects = snapper
        path = /mnt/btrfs_fs

The share path must correspond to a Btrfs subvolume, and have an associated Snapper configuration. Additionally, Snapper must be configured to grant users snapshot access - see the vfs_snapper man page for more details.

Many thanks to:
  • Arvin Schnell and other Snapper developers.
  • My colleagues at SUSE Linux, and fellow Samba Team members, for supporting my implementation efforts.
  • Kdenlive developers, for writing a great video editing suite.

Sunday, January 12, 2014

Samba Transparent File Compression on Btrfs

I recently implemented support for the SMB ioctls required to allow clients to remotely manipulate file and directory compression flags on Btrfs.

Windows Explorer provides the ability to flag files and folders for transparent compression via the File->Properties->Advanced dialog box:

Windows Explorer Advanced Attributes Dialog
 
Files flagged for compression are transparently compressed and uncompressed by the underlying filesystem when accessed or modified, which normally means that storage capacity is saved at the expense of extra CPU overhead during file I/O.

New files and folders inherit the compression flag from the parent folder, unless created with the FILE_NO_COMPRESSION option.

Once flagged, Windows explorer presents compressed files and folders differently to those that aren't compressed:

Windows Explorer Directory Listing
This feature will be available with the upcoming release of Samba 4.2, and is enabled with the Btrfs Samba VFS module. E.g.:
...
[share]
        vfs objects = btrfs
        path = /mnt/btrfs_fs

Monday, November 18, 2013

Samba Server-Side Copy Offload

I recently implemented server-side copy offload support for Samba 4.1, along with Btrfs filesystem specific enhancements. This video compares server-side copy performance with traditional copy methods.


A few notes on the demonstration:
  • The Windows Server 2012 client and Samba server are connected via an old 100 Mb/s switch, which obviously acts as a network throughput bottleneck in the traditional copy demonstration.
  • The Samba server resembles the 4.1.0 code-base, but includes an extra patch to disable server-side copy requests on the regular share.

Many thanks to:
  • My colleagues at SUSE Linux, for supporting my implementation efforts.
  • The Samba Team, particularly Metze and Jeremy, for reviewing the code.
  • Kdenlive developers, for writing a great video editing suite.

Update (July, 2014): Usage is now fully documented on the Samba Wiki.