41 smb 3.0

31
Published: 4 th September, 2012 Windows Server 2012: Storage Module 2: SMB 3.0 Module Manual Author: Rose Malcolm, Content Master

Upload: mdabdul-nabi

Post on 16-Apr-2017

27 views

Category:

Education


0 download

TRANSCRIPT

Page 1: 41 smb 3.0

Published: 4th September, 2012

Windows Server 2012: Storage

Module 2: SMB 3.0

Module Manual Author: Rose Malcolm, Content Master

Page 2: 41 smb 3.0

Microsoft Virtual Academy Student Manual ii

Information in this document, including URLs and other Internet Web site references, are subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. ® 2012 Microsoft Corporation. All rights reserved. Microsoft is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Page 3: 41 smb 3.0

Microsoft Virtual Academy Student Manual iii

Contents

CONTENTS .................................................................................................................................................................................................................. III

MODULE 2: SMB 3.0. ............................................................................................................................................................................................... 4

Module Overview ................................................................................................................................................................................................ 4

LESSON 1: SMB OVERVIEW .................................................................................................................................................................................. 5

CONTINUOUS AVAILABILITY ............................................................................................................................................................................... 6

SMB TRANSPARENT FAILOVER ........................................................................................................................................................................... 8

SMB TRANSPARENT FAILOVER: NEW COMPONENTS ............................................................................................................................ 10

SMB 3.0 Client ....................................................................................................................................................................... 10 SMB 3.0 Server ....................................................................................................................................................................... 11 Resume Key ............................................................................................................................................................................ 11 Witness Service ....................................................................................................................................................................... 11

USING CLUSTER CLIENT FAILOVER ................................................................................................................................................................. 12

SMB 3.0 DAS EQUIVALENCE .............................................................................................................................................................................. 13

SMB MULTICHANNEL ........................................................................................................................................................................................... 15

SMB DIRECT .............................................................................................................................................................................................................. 16

VSS FOR SMB FILE SHARES................................................................................................................................................................................. 17

LESSON 2: SUPPORTING SQL OVER SMB ..................................................................................................................................................... 18

SQL SERVER DATABASE STORAGE .................................................................................................................................................................. 19

SIMPLER DATABASE MIGRATION .................................................................................................................................................................... 20

CHANGES TO SQL SERVER.................................................................................................................................................................................. 21

SQL Server 2008 R2 ............................................................................................................................................................... 21 SQL Server 2012 .................................................................................................................................................................... 21

LESSON 3: SUPPORTING HYPER-V OVER SMB ........................................................................................................................................... 23

HYPER-V OVER SMB .............................................................................................................................................................................................. 24

What Is Hyper-V over SMB? .................................................................................................................................................. 24 Highlights ............................................................................................................................................................................... 24 Supporting Features ............................................................................................................................................................... 25

REQUIREMENTS FOR HYPER-V OVER SMB .................................................................................................................................................. 26

CONFIGURING HYPER-V OVER SMB .............................................................................................................................................................. 28

HOW TO CONFIGURE HYPER-V TO USE AN SMB SHARE ...................................................................................................................... 30

FURTHER READING AND RESOURCES ........................................................................................................................................................... 31

Page 4: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual 4

Module 2: SMB 3.0.

Module Overview

The Server Message Block (SMB) protocol is the file sharing protocol that is used by default on

Windows® computers. To support this, Windows Server 2012 now provides a vast set of new SMB

features with an updated SMB protocol (SMB 3.0) that greatly enhances the reliability, availability,

manageability, and performance of file servers.

This module explains SMB 3.0 and how it supports Microsoft® SQL Server® 2012 and Hyper-V.

Page 5: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual 5

Lesson 1: SMB Overview

Customers require storage solutions that are cost-effective—and easy to configure and access—but

still provide high levels of reliability and continuous availability.

This lesson explains how the enhanced SMB protocol in Windows Server 2012 helps to satisfy those

requirements.

Page 6: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual 6

Continuous Availability

Continuous availability is important to customers, particularly those running SQL Server databases or

Hyper-V.

To understand how Windows Server 2012 supports these customer requirements, it is necessary to

define what is meant by the term continuous availability in this context.

Definition: Continuously available software and hardware platforms are designed to support

transparent failover without data loss.

It is also necessary to define transparent failover in this context.

Definition: Transparent failover is the ability to survive planned moves or unplanned failures—without errors, without losing data, and while performing well at scale.

Page 7: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual 7

This means that effective storage solutions must enable you to perform maintenance, and they must

survive unplanned failures. Applications such as SQL Server or Hyper-V that are using such storage

must continue to run despite failures in the storage layer.

Page 8: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual 8

SMB Transparent Failover

SMB Transparent Failover provides the ability for the file servers in a cluster configuration to fail over

in such a way that there is zero downtime, with only a small I/O delay during failover. The failover is

completely transparent to applications using the cluster as file storage, such as SQL Server or Hyper-

V.

SMB Transparent Failover supports a variety of cases, including planned moves, load balancing,

operating system restarts, unplanned failures, and client redirection for scale out clusters.

supports both file and directory-level operations. For example, a computer running SQL Server that

accesses an SMB file server cluster opens a number of files during the normal course of operations,

which need to be able to transparently fail over.

Directory operations must also be able to fail over transparently. For example, in a Hyper-V

environment where the virtual machines (VMs) are stored on a file server cluster, when you deploy a

new VM, Hyper-V will create a folder structure on each node of the cluster. These folder creation

operations need to be transparent, so that you can deploy VMs, even in the event of an unplanned

failover.

Page 9: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual 9

To support SMB Transparent Failover, the file server cluster must be a Windows Server 2012 cluster.

The application, such as SQL Server or Hyper-V, must also be running on a Windows Server 2012

server.

Page 10: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

10

SMB Transparent Failover: New Components

There are a number of components involved in accomplishing the transparent failover, ensuring that

the actual move of file handles and SMB connections between two servers is completely transparent

to the application. Some of these components are new to SMB 3.0.

SMB 3.0 Client The SMB 3.0 client has the capability to replay an operation. For example, if a read is in process

when a failover happens, the read operation is replayed. These types of operations are known as

idempotent operations.

There are operations that you cannot simply replay, such as file deletions. These types of operations

are known as non-idempotent operations. If a failover occurs when a file deletion is in progress, the

result is unpredictable, as far as the client is concerned. The file server may have completed the

deletion and not reported the result to the client, or it may not have completed the deletion at all. If

the delete operation is replayed, the client will either be notified of a successful deletion or an “object

not found” error, because the file had been deleted before the move.

Page 11: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

11

SMB 3.0 Server SMB 3.0 uses network state persistence to resolve the issue of operations that cannot be replayed,

keeping track of the state of the file handles and connections for SMB.

In addition, to ensure that data does not wait in cache on a file server but is written to disk, file

handles on the local disk are always opened as write-through. In the event that a file server node

fails, you know that the data has been written to disk. It is detrimental to have a number of file

operations in memory, waiting to be written to disk; if the file server node fails, those operations are

lost, which is not acceptable.

Resume Key SMB 3.0 introduces Resume Key, which manages the operations that are used for recovery after a

failover.

Resume Key holds all of the state information so that when the client returns after the failover has

completed, the state information can be returned to the client, including whether any file deletions

have been completed (from the SMB 3.0 client example).

Witness Service The Witness Service plays a critical role, especially in recovering unplanned failures.

SMB is a protocol that runs over TCP/IP. When communicating over TCP/IP, clients discover a server

failure because the lack of response from the server results in the client receiving TCP timeout

messages. After sufficient TCP timeouts, the client will attempt to reconnect with the server. Waiting

for TCP timeouts and reconnections is a lengthy process, and the Witness Service enables faster

unplanned failover because clients do not wait for timeouts. Rather, the Witness Service provides a

notification that a file server is no longer available and the client should fail over and reconnect to

another server.

Page 12: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

12

Using Cluster Client Failover

Cluster Client Failover (CCF) is applicable for server applications that support failover clusters. CCF

ensures that the server application can access its data files in the event of an unplanned failure of

the server application cluster node.

Organizations can use CCF in developing their own line-of-business (LOB) applications that can fail

over transparently.

Developers of LOB server applications should use new the RegisterAppInstance application

programming interface (API) to register the application instance and ensure that the application calls

the API prior to opening any remote files.

Additionally, the application should check to make sure that open files are persistent. Persistent files

have a handle opened on a file share that supports transparent failover. You can check for

persistence by using the GetFile InformationByHandleEx command.

Page 13: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

13

SMB 3.0 DAS Equivalence

Performance is especially important for organizations that run SQL Server or Hyper-V. Currently,

many organizations run SQL Server or Hyper-V on directly attached storage (DAS), Internet small

computer system interface (iSCSI), or Fibre Chanel storage area network (SAN) to help maximize

I/O performance. One of the performance objectives for SMB 3.0 was to have file access over 1

gigabit per second (Gbps) Ethernet match the performance of DAS.

Microsoft conducted a top-to-bottom performance analysis and tuning, including SMB server

optimization, adding new tracing instrumentation to help identify bottlenecks, and substantial

refactoring of the SMB 2 client.

SMB 3.0 in Windows Server 2012 performs at approximately 98 percent of DAS transactional

performance under the following conditions:

Identical servers and storage

1 Gbps Ethernet versus 4 Gbps Fibre Chanel

28 x 10,000 rpm hard disk drive

Page 14: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

14

This enables administrators to take advantage of the flexibility of file-based remote storage. Storage

can be moved easily because it is remote from the application server, and the application server can

be located on a different physical machine to take advantage of performance gains.

Page 15: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

15

SMB Multichannel

SMB Multichannel uses multiple TCP connections for each SMB session, where available. For example,

if a server configuration has multiple 1-gigabit network interface cards (NICs) between a computer

running SQL Server and a back-end file store, SMB Multichannel will automatically aggregate the

bandwidth that is available.

SMB Multichannel supports transparent failover; it will recover from a network failure if another

connection is available. This provides a highly resilient network environment that can support SQL

Server and Hyper-V, along with other business-critical applications.

In addition to automatically aggregating bandwidth across multiple NICs, SMB Multichannel provides

improved throughput by using multiple CPUs for network processing with multiple NICs or NICs that

are capable of supporting Receive Side Scaling (RSS).

SMB Multichannel configuration is automatic: SMB 3.0 automatically detects and uses multiple

network paths.

Page 16: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

16

SMB Direct

Applications such as SQL Server and Hyper-V can make high demands on CPU and memory

resources. SMB 3.0 helps to maximize the performance of your SQL Server or Hyper-V server,

reducing CPU utilization for I/O processing by offloading processing to NICs where possible.

SMB Direct uses remote direct memory access (RDMA), enabling data to be moved between two

computers without involving the TCP/IP stack. This permits high-throughput, low-latency networking

but relies on RDMA-capable NICs (R-NICs).

As with SMB Multichannel, SMB Direct automatically discovers and uses R-NICs. SMB Direct works

with SMB Multichannel, aggregating multiple R-NICs, and uses SMB Multichannel for load balancing

and failover.

SMB Direct has the traditional advantages of SMB file storage: it is easy to provision, manage, and

migrate, and it requires no application change or admin configuration.

Page 17: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

17

VSS for SMB File Shares

SMB 3.0 provides support for storage data backup by enabling the Volume Shadow Copy Service

(VSS) on SMB files shares.

In Windows Server 2012, VSS is capable of creating application-consistent shadow copies for server

application data and storing those shadow copies on SMB 3.0 shares.

For backup and restore purposes, you should verify that your backup software supports scenarios

where shadow copies are stored remotely from the application server.

Next step watch the SMB 3.0 High Performance Storage with Transparent Failover video

Page 18: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

18

Lesson 2: Supporting SQL over SMB

This lesson provides more detail about how SMB 3.0 impacts the design of your SQL Server storage.

Page 19: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

19

SQL Server Database Storage

With SMB 3.0, Windows Server 2012 offers a new way of storing and accessing database files. You

can store your database files on a shared network, providing access to consolidated file-level remote

storage.

Storing databases in this way offers a number of benefits:

High performance

High availability

Simpler management:

o Manage SMB file shares instead of SAN storage.

o Relocate servers and services dynamically.

o Manage database storage operations within one organization.

Reduce SQL Server solution complexity:

o Single set of shares accessed by Universal Naming Convention (UNC) paths.

Page 20: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

20

Simpler Database Migration

Storing databases on SMB remote file shares simplifies the database migration process.

This slide lists the typical tasks that you would perform when moving your SQL Server database,

with tasks for a SAN configuration on the left, and tasks for an SMB configuration on the right.

Page 21: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

21

Changes to SQL Server

The changes necessary for SQL Server to support SMB shares were implemented gradually across

SQL Server 2008 R2 and SQL Server 2012.

SQL Server 2008 R2 SQL Server 2008 R2 supports storing user databases on SMB file shares but requires a startup trace

flag to enable SQL Server to use file shares.

SQL Server 2012 SQL Server 2012 offers full support for storing databases on SMB 3.0 file shares, including the

following capabilities:

It supports storing user databases on SMB file shares and removes the requirement for a

trace flag.

It supports SQL Server clusters using SMB file shares:

o It adds flexibility to cluster configurations.

o It removes the drive-letter restriction for cluster groups.

It adds support for storing the system databases on SMB file shares:

Page 22: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

22

o The root of the SQL Server installation can now be on the share.

Additionally, there is a Windows fix for improved performance (253493), which significantly improves

performance for online transaction processing (OLTP) workloads on Windows Server 2008 R2.

Page 23: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

23

Lesson 3: Supporting Hyper-V over SMB

This lesson provides more detail about how SMB 3.0 impacts the design of your Hyper-V server

storage.

Page 24: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

24

Hyper-V over SMB

By providing an extremely flexible way to provide and manage storage, SMB File Storage for

virtualization helps organizations to maximize the reliability, availability, and performance of their

Hyper-V environments in a cost-effective manner.

What Is Hyper-V over SMB? Hyper-V over SMB enables you to store Hyper-V files in shares over the SMB 3.0 protocol. You can

store VM configuration files, virtual hard disk (VHD) files, and even snapshots on an SMB 3.0 share.

You can store files for both stand-alone and clustered servers. In a clustered environment, the file

storage is used as cluster shared storage.

Highlights Hyper-V over SMB has the following benefits:

It increases flexibility.

It eases provisioning, management, and migration.

It leverages converged network.

It reduces capital expenditure (CapEx) and operating expenditure (OpEx).

Page 25: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

25

Supporting Features File storage for virtualization uses some of the key features of SMB 3.0:

SMB Transparent Failover—continuous availability

SMB Scale-Out—active:active file server clusters

SMB Direct (SMB over RDMA)—low latency, low CPU use

SMB Multichannel—network throughput and failover

SMB Encryption—security

VSS for SMB File Shares—backup and restore

SMB PowerShell—manageability

Page 26: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

26

Requirements for Hyper-V over SMB

The requirements for implementing Hyper-V over SMB 3.0 are as follows:

One or more computers running Windows Server 2012 with the File Services role installed:

o The file server must have Windows Server 2012 installed, so the new SMB 3.0 protocol

is available. You can also use servers from vendors other than Microsoft that

implement the SMB 3.0 protocol. Hyper-V does not block older versions of SMB;

however, the Hyper-V Best Practice Analyzer issues an alert when an older version of

SMB is detected.

One or more computers running Windows Server 2012 with the Hyper-V role installed.

A common Active Directory® directory service infrastructure:

o The servers running Active Directory Domain Services (AD DS) do not need to run

Windows Server 2012.

o An Active Directory infrastructure is required, so you can grant permissions to the

computer account of the Hyper-V hosts.

The supported configurations are as follows:

Stand-alone Hyper-V servers (not a high-availability solution).

Hyper-V servers configured in a failover cluster.

Page 27: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

27

Note: Loopback configurations (where the computer that is running Hyper-V is used as the file server for

VM storage) are not supported.

Note: Although not required, failover clustering is supported on the Hyper-V side, the File Services side, or

both. They must be separate clusters.

Page 28: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

28

Configuring Hyper-V over SMB

The process of configuring your Hyper-V environment to use SMB 3.0 file shares is similar to

configuring a simple file share; you must create and share the folder and apply the appropriate

permissions.

To configure file storage for virtualization, the following accounts require full permissions on the

NTFS folder and the SMB share:

Hyper-V administrator

Computer account of Hyper-V host computers

If Hyper-V is clustered, the Hyper-V cluster account

The first step in the configuration process is to create a folder on the target file server or cluster. For

example, you could create a folder named VMS from the command prompt, as the following code

example shows.

MD F:\VMS

The next step is to share that folder and apply share permissions. The following code example uses

the VMS folder from the previous step.

Page 29: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

29

New-SmbShare -Name VMS -Path F:\VMS -FullAccess Dom\HAdmin, Dom\HV1$, Dom\HV2$,

Dom\HVC$

Next, you must apply NTFS permissions. You can do this by retrieving the share permissions and

applying them as NTFS folder permissions. The following code example uses the VMS share. (Get-SmbShare –Name VMS).PresetPathAcl | Set-Acl

Page 30: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

30

How to Configure Hyper-V to Use an SMB Share

Finally, you must configure your VM to use an SMB share. You can perform this task by using the

graphical management tool or by using the command line.

In Hyper-V Manager, you can configure the VM settings. Simply select the hard disk channel to which

you want to connect the VHD that is stored on the share and then specify the location as a UNC path.

Alternatively, you can use Windows PowerShell™ 3.0 cmdlets to create and configure new VHDs and

VMs. Again, you should specify the location of the VHD or VM as a UNC path.

Page 31: 41 smb 3.0

Module 2: SMB 3.0

Microsoft Virtual Academy Student Manual

31

Further Reading and Resources

For further information about the topics covered in this session, see the following resources:

Server Message Block Overview

http://technet.microsoft.com/en-us/library/hh831795.aspx

Deploy Hyper-V over SMB 3.0

http://technet.microsoft.com/en-us/library/jj134187.aspx

Windows Server Blogs

http://blogs.technet.com/b/windowsserver/

Windows Server 2012 Home Page and Product Download

http://www.microsoft.com/en-us/server-cloud/windows-server/2012-default.aspx