[6/18 11:17 AM] Katherine Spencer (Collabera)
"We're setting up this time for you to discuss with our experts on Graph. Could you please provide us with a rough list of questions prior to the meeting to help us prepare and steer you in the right direction."
SQL Server Remote Storage (SMB3)Eric Bortei-Doku, Steve Smith
Agenda
Overview
Configuration
Documentation
Code examples
Overview
Adapting SQL Server to run on SMB3 storageTypically, deployments have been direct-attached or, have been based on Storage Area Networks (SANs).
Support of CIFS/SMB has been a gray zone
Apps on fileservers
Typical apps for fileservers Document repositories, user file storage etc.
o High volume/IO ratio
o More full file writes than write-in-place
o Not typically IO bound
Databases on fileservers Higher IO/volume ratio
Mostly write-in-place
More likely to be IO bound
May have hotspots
Why Not?
Historically, CIFS/SMB-based storage has been perceived as having:o Unreliable connections
o Unreliable storage on the fileserver
o Poor Performance
o Lack of integrity guarantees.
The world has changedo Ethernet hardware is more reliable
o Speeds are competitive
o Fiber channel over Ethernet (FCoE) – an example of Ethernet maturity
o Robust storage behind the file server
Simpler management
End-user self-service
Performance gap between Ethernet & Fiber Channel is shrinking
0.1
1
10
100
1997 2001 2005 2008 2011
FC Performace
Gb/sec
Ethernet
PerformanceGb/sec
Windows SMB3 Implementation has improved Performance
Efficiency
Resiliency
Interop offerings bring SQL into play
Resiliency
What are the considerations?
Reliability
Performance
SQL IO Requirementso Stable Media
o Write ordering
o Torn I/O Prevention
Compatibilityo NTFS compatibility – alternate data streams etc.
Testing Infrastructureo Automated provisioning of file servers etc.
SQL Server with SMB3 fileshare storage
• Starting with SQL Server 2012 (11.x), system databases
(Master, Model, MSDB, and TempDB), and Database
Engine user databases can be installed with Server
Message Block (SMB) 3 file server as a storage option
• Applies to both SQL Server stand-alone and SQL
Server failover clustering instances (FCI)
Installation and Configuration Options
Installation Considerations
• Supported Universal Naming Convention (UNC) Path
formats for standalone and FCI databases:
• \\ServerName\ShareName\
• \\ServerName\ShareName
• Unsupported UNC path formats:
• Loopback path, e.g., \\localhost\..\ or \\127.0.0.1\...\
• Administrative shares, e.g., \\servername\x$
• Other UNC path formats like \\?\x:\
• Mapped network drives.
Installation Options
• Set the parameter “Data root directory as “\\fileserver1\share1\
• In command prompt installation, specify the “/INSTALLSQLDATADIR” as
\\fileserver1\share1\
• Sample syntax to install SQL Server on a Standalone server using SMB3
file share option
Setup.exe /q /ACTION=Install /FEATURES=SQL
/INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="<DomainName\UserName>"
/SQLSVCPASSWORD="<StrongPassword>"
/SQLSYSADMINACCOUNTS="<DomainName\UserName>"
/AGTSVCACCOUNT="<DomainName\UserName>"
/AGTSVCPASSWORD="<StrongPassword>"
/INSTALLSQLDATADIR="\\FileServer\Share1\"
/IACCEPTSQLSERVERLICENSETERMS
Supported DDL
• Transact-SQL DDL statements and database engine
stored procedures support SMB3 file shares:
• CREATE DATABASE (SQL Server Transact-SQL)
• ALTER DATABASE (Transact-SQL)
• RESTORE (Transact-SQL)
• BACKUP (Transact-SQL)
OS System considerations
Operating System SMB3 protocol dialect Benefits to SQL Server
Windows Server 2008 2.0.2 Improved performance over
previous CIFS/SMB versions.
Durability, which helps
recover from temporary
network glitches.
Windows Server 2008 R2,
including Server Core
2.1 Support for large MTU,
which benefits large data
transfers, such as SQL
backup and restore.
Significant performance
improvements, specifically
for SQL OLTP style
workloads
OS System considerations
Operating System SMB3 protocol dialect Benefits to SQL Server
Windows Server 2012,
including Server Core
3.0 Support for transparent
failover of file shares
providing.
Support for IO using
multiple network interfaces
simultaneously.
Support for network
interfaces with RDMA
capabilities.
Support for Scale Out File
Server (SoFS) with
continuous availability.
OS System considerationsOperating System SMB3 protocol dialect Benefits to SQL Server
Windows Server 2012 R2,
including Server Core
3.0.2 Support for RDMA
capabilities using SMB Direct
[MS-SMBD].
.
Optimized for small random
read/write I/O common to
SQL Server OLTP.
Maximum Transmission Unit
(MTU) is turned on by
default
OS System considerationsOperating System SMB3 protocol dialect Benefits to SQL Server
Windows Server 2016,
including Server Core,
Windows Server 2019
3.1.1 Supporting the negotiation
of encryption and integrity
algorithms.
Supporting the compression
of messages between client
and server.
Security Considerations
• The SQL Server service account and SQL Server agent service
account should have FULL CONTROL share permissions and
NTFS permissions on the SMB3 share folder
• The FULL CONTROL share permissions and NTFS permissions
on the SMB3 share folders should be restricted to: SQL Server
service account, SQL Server Agent service account and
windows users with admin server role
Documentation
[MS-SQLRS] Profile Document
[MS-SQLRS] : SQL Server Remote Storage Profile
• Specifies information regarding the implementation for
hosting Microsoft SQL Server databases on Server Message
Block (SMB) 3 shares
• Describes the files associated with the storage of databases.
These include data files, transaction log files, and other
associated on-disk artifacts.
• Clarifies the level of support that SQL Server requires from
SMB3 servers that host these types of files.
[MS-SQLRS]: Associated Protocol Docs
• [MS-FSA] Microsoft Corporation, "File System Algorithms".
• [MS-FSCC] Microsoft Corporation, "File System Control
Codes".
• [MS-SMB2] Microsoft Corporation, "Server Message Block
(SMB) Protocol Versions 2 and 3".
Code examples
[MS-SQLRS] : File System Control Codes example 1:
• Scenario: You want SQL Server to issue a query on the stream
to retrieve file system integrity information. Possible if:
• Server supports the FSCTL_FILESYSTEM_GET_STATISTICS
control code
-and, in that case…-
• Server responds with a FILESYSTEM_STATISTICS structure,
with a FileSystemType field value of
FILESYSTEM_STATISTICS_TYPE_REFS
[MS-SQLRS] : File System Control Codes example 4:
• Scenario: SQL Server can query properties of the volume that
are underlying the remote file share if:
• Server supports the IOCTL_VOLUME_GET_GPT_ATTRIBUTES
control code
Resources
• [MS-SMB2]: Server Message Block Protocol v2
• [MS-SMBD]: SMB2 Remote Direct Memory Access (RDMA) Transport Protocol
• [MS-SQLRS]: SQL Server Remote Storage Profile
Questions?
© Copyright Microsoft Corporation. All rights reserved.
Thank you!