Server-Side Copy: Difference between revisions
m (fix link) |
(update Linux kernel client support status) |
||
Line 78: | Line 78: | ||
== Client Support == |
== Client Support == |
||
=== Windows === |
|||
Windows Server 2012, Windows 8, and later releases support SMB2 FSCTL_SRV_COPYCHUNK server-side copy operations. On these platforms, Windows |
Windows Server 2012, Windows 8, and later releases support SMB2 FSCTL_SRV_COPYCHUNK server-side copy operations. On these platforms, Windows Explorer initiated file copies attempt server-side copy offload by default. |
||
[http://article.gmane.org/gmane.linux.kernel.cifs/8962 Preliminary patches] have been proposed for the Linux Kernel CIFS client. Server-side copy offload is initiated on Linux using ''cp --reflink''. |
|||
=== Linux === |
|||
The Linux Kernel CIFS client [https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9bf0c9cd431440a831e60c0a0fd0bc4f0e083e7f includes support] for issuing SMB2 FSCTL_SRV_COPYCHUNK_WRITE server-side copy requests. This feature can currently only be utilised by issuing a special CIFS_IOC_COPYCHUNK_FILE ioctl. Attempts to plumb this into the ''cp --reflink'' code path [http://permalink.gmane.org/gmane.linux.kernel.cifs/9139 were rejected]. |
Revision as of 13:36, 28 March 2014
Introduction
Samba 4.1.0 was the first release to ship with support for server-side copy operations via the SMB2 FSCTL_SRV_COPYCHUNK request. Clients making use of server-side copy support, such as Windows Server 2012, can experience considerable performance improvements for file copy operations, as file data need not traverse the network. This feature is enabled by default on the smbd file server.
Traditional File Copy
Prior to Samba 4.1.0, clients traditionally copied files by reading the source file data over the network and writing it back to the server through to the destination file on disk.
Sequence
|
Server-Side Copy Offload
With Samba 4.1.0 and later, clients can offload copy operations to the server using Copy-Chunk requests. In processing such a request, the network round-trip is avoided.
Sequence
|
Samba's smbd file server supports SMB2 Copy-Chunk requests by default, no additional configuration is required.
Btrfs Enhanced Server-Side Copy Offload
Along with server-side copy support, a Btrfs specific Samba VFS Module was newly added with 4.1.0. This module improves the performance and efficiency of server-side copy operations on Btrfs backed shares, by using the Btrfs clone-range IOCTL.
Sequence
|
Btrfs enhanced server-side copy can be enabled in smb.conf on a per share basis with:
[share] path = /mnt/btrfs_fs/ # must reside within a Btrfs filesystem vfs objects = btrfs
Limitations
- The client's FSCTL_SRV_COPYCHUNK server-side copy request must be Btrfs filesystem aligned
- Otherwise, Samba falls back to a regular server-side copy
Client Support
Windows
Windows Server 2012, Windows 8, and later releases support SMB2 FSCTL_SRV_COPYCHUNK server-side copy operations. On these platforms, Windows Explorer initiated file copies attempt server-side copy offload by default.
Linux
The Linux Kernel CIFS client includes support for issuing SMB2 FSCTL_SRV_COPYCHUNK_WRITE server-side copy requests. This feature can currently only be utilised by issuing a special CIFS_IOC_COPYCHUNK_FILE ioctl. Attempts to plumb this into the cp --reflink code path were rejected.