Upload
murilo-miranda
View
1.178
Download
1
Embed Size (px)
Citation preview
WFCI - Storage Introduction
What options do we have?
Prepared by Murilo MirandaNovember, 2013
About MeMurilo MirandaDBA @ The Pythian Group
© 20132
@murilocmiranda
http://www.sql.pt/
http://pt.linkedin.com/in/murilomiranda/
Agenda• WFC Overview.
• WFCI Supported storage types:
– Local Disk.– SMB File Share.
– Shared Storage.
– Clustered Shared Volumes.
• Conclusion
• Questions and Answers.
© 20133
Windows Failover Cluster
Overview
© 20134
WFC – The advantages
• In a SQL Server perspective:– The WFC’s role is to make the instance highly available (WFCI).
– Protects from hardware failures.
– Applying service packs and hotfixes are less impactful.
– It’s transparent for the applications/users connecting to the instance.
© 20135
WFC – Handicaps
• Still in a SQL Server perspective :– Expensive than a standalone installation.
• In € and effort:– More hardware.– More maintenance.
– It’s a HA solution only.• No performance improvements.
– Doesn’t guaranties you 100% uptime.
• You always will have the “fail over period”.
© 20136
Standalone instance
© 20137
Standalone instance
© 20138
Standalone instance
© 2013 Pythian9
HO
ST
NA
ME
• One hostname.
Standalone instance
© 201310
HO
ST
NA
ME
• One hostname.• One or more IP addresses.
Standalone instance
© 201311
HO
ST
NA
ME
• One hostname.• One or more IP addresses.• One or more disks.
Standalone instance
© 201312
HO
ST
NA
ME
• One hostname.• One or more IP addresses.• One or more disks.
Standalone instance
© 201313
HO
ST
NA
ME
Standalone instance
© 201314
HO
ST
NA
ME
Standalone instance
© 201315
HO
ST
NA
ME
Clustered instance
© 201316
Failover Cluster
Failover Cluster
Local Hostname
Local Hostname
Local Hostname
Local Hostname
Clustered instance
© 201317
Failover ClusterFailover Cluster
HO
ST
NA
ME
IPIP
Assigned Storage
Assigned Storage
Local Hostname
Local Hostname
Local Hostname
Local Hostname
Clustered instance
© 201318
Failover ClusterFailover Cluster
Local Hostname
Local Hostname
Local Hostname
Local Hostname
HO
ST
NA
ME
IPIP
Assigned Storage
Assigned Storage
Clustered instance
© 201319
Failover ClusterFailover Cluster
Local Hostname
Local Hostname
Local Hostname
Local Hostname
HO
ST
NA
ME
IPIP
Assigned Storage
Assigned Storage
Clustered instance
© 201320
Failover ClusterFailover Cluster
Local Hostname
Local Hostname
Local Hostname
Local Hostname
HO
ST
NA
ME
IPIP
Assigned Storage
Assigned Storage
Clustered instance
• The connection “is made to” the hostname assigned to the SQL Server role.
© 201321
Clustered instance
• The connection “is made to” the hostname assigned to the SQL Server role.
• The cluster service redirects the connection to the appropriate (active) node.– Where the SQL Server service is UP and listening.
– Where all the disks are mounted.
© 201322
WCFI supported storage types What is supported for the database files.
© 201323
WCFI supported storage types
• For SQL Server, we have four options:– Local Disk
• From SQL Server 2012
© 201324
WCFI supported storage types
• For SQL Server, we have four options:– Local Disk
• From SQL Server 2012– SMB File Share
© 201325
WCFI supported storage types
• For SQL Server, we have four options:– Local Disk
• From SQL Server 2012– SMB File Share – Shared Storage
© 201326
WCFI supported storage types
• For SQL Server, we have four options:– Local Disk
• From SQL Server 2012– SMB File Share – Shared Storage– Clustered Shared Volumes
• From SQL Server 2014
© 201327
Local Disk
• In a clustered instance it’s possible to store the TempDB into a local disk.
© 201328
Local Disk
• In a clustered instance it’s possible to store the TempDB into a local disk.
• This local disk is not a cluster resource, so, this is not an option to user database files.
© 201329
Local Disk
• What are the benefits in have the TempDB stored in a local disk?– More flexibility to chose the storage type.
• Utilize disks with a higher rotational speed.
– TempDB will utilize a different path than user databases to access data and log files.
• Less congestion and contention on shared storage.
• This is a benefit for both TempDB and other databases.
© 201330
Local Disk– We can take advantage of PCIe.
• At least 6 times the speed of traditional PCI.
– More throughput than a disk interface or HBA.
© 201331
Local Disk• Fusion-IO, OCZ and LSI Corp products are options.
– Fusion-IO is the first firm to provide a direct PCI Express storage solution that doesn’t utilize an internal storage interface like SATA, but is not bootable.
© 201332
Local Disk• Good article about PCIe and SSDs:“Three PCI Express-Based SSDs: When SATA 6 Gb/s Is Too Slow” – http://goo.gl/dhDaTy
© 201333
SMB File Share
• SMB 3.0 was introduced with Windows Server 2012.– It brought several significant changes to add functionality and improve SMB performance.
• System and User DBs can be installed with SMB file server as a storage option. – This applies to both SQL Server stand-alone and SQL Server WFCI.
© 201334
SMB File Share • Windows Server 2008 (SMB 2.0)– Durability, which helps recover from temporary network glitches.
• Windows Server 2008 R2 (SMB 2.1)– Significant performance improvements, specifically for SQL OLTP style workloads.
• Windows Server 2012 (SMB 3.0)– Support for transparent failover of file shares providing zero downtime.
• Windows Server 2012 R2 (SMB 3.02)– MTU is turned on by default, which significantly enhances performance in large sequential transfers like SQL Server data warehouse and database backup or restore.
© 201335
SMB File Share • Supported Universal Naming Convention (UNC):– \\ServerName\ShareName\– \\ServerName\ShareName
• Not supported UNC:– Loopback path:
• \\localhost\..\ or \\127.0.0.1\...\
– Administrative shares:• \\servername\x$
– Other UNC path formats like \\?\x:\
– Mapped network drives.© 201336
SMB File Share • SMB protocol version is transparent to SQL Server.
• The SQL Server engine and SQL Server agent service accounts should have FULL CONTROL share permissions and NTFS permissions on the SMB share folders.
© 201337
SMB File Share
© 201338
SMB File Share
© 201339
SMB File Share • Network performance starts to be more than critical!– Consider use a dedicated network to access the share.
• We will need to monitor the file share performance.– Physical disk counters.– Memory.– CPU. © 201340
SMB File Share • This option is not so good as SAN, but we can take advantage in few points:
– In non-prod/DR servers.– Light databases.– Emergency/Temporary storage.
– Database migrations.
© 201341
Shared Storage• Shared storage allows direct disk access from multiple computers simultaneously. – All nodes of the WFC are physically connected.
– Only the active node is able to access the disk.
© 201342
Shared Storage• Shared storage allows direct disk access from multiple computers simultaneously. – All nodes of the WFC are physically connected.
– Only the active node is able to access the disk.
• A shared storage allows connections on either:– Multiple ports. – Single port - tracking multiple sessions.
• Typically this shared storage is on a SAN.
© 201343
Shared Storage
• SAN – Storage Area Network.– Network to connect systems and storage for the purpose of transmitting storage I/O.
• Based on Fiber Channel, iSCSI or FC over Ethernet (FCoE).
• Support speed up to 16 GB/s
• Centralizes storage and management.
• Provides access to block level data storage.
– SAN may contain shared storage devices.
© 201344
Shared Storage
© 201345
HP EVA 3000
Shared Storage
© 201346
FC SANFC SANIP NetworkIP Network
Clients Servers Storage Arrays
Shared Storage
• iSCSI Initiator:
© 201347
Shared Storage
• Disk Management:
© 201348
Shared Storage
• FC manager:
© 201349
Shared Storage
© 201350
Shared Storage
• Be careful with dependencies!– Adapt your disk strategy to you cluster configuration.
© 201351
Shared Storage
© 201352
W2012SQL01 W2012SQL02
Shared Storage
© 201353
W2012SQL01 W2012SQL02
Shared Storage
© 201354
W2012SQL01 W2012SQL02
Shared Storage
© 201355
Shared Storage
© 201356
Shared Storage
© 201357
Shared Storage
© 201358
W2012SQL01 W2012SQL02
SAN
Shared Storage
© 201359
W2012SQL01 W2012SQL02
SAN
Clustered Shared Volume
• CSV was being used to facilitate Virtual Machines management.– Supported since Windows 2008 R2.
• Clustered Shared Volumes (CSV) could be a solution to increase the HA!
• ”Now” is supported on SQL Server 2014.
© 201360
Clustered Shared Volume
• How it works?– CSVs are still on SAN.– The difference is the way they’re managed.
© 201361
Clustered Shared Volume
• How it works?– CSVs are still on SAN.– The difference is the way they’re managed.
• Only one node is the owner – Coordinator Node
– CN can be any node, even if is not the SQL active node.
© 201362
Clustered Shared Volume
• How it works?– CSVs are still on SAN.– The difference is the way they’re managed.
• Only one node is the owner – Coordinator Node
– CN can be any node, even if is not the SQL active node.
• The CN uses SMB (Server Message Block) to manage the I/O between the storage and all the cluster nodes.
© 201363
Clustered Shared Volume
• How it works?– CSVs are still on SAN.– The difference is the way they’re managed.
• Only one node is the owner – Coordinator Node
– CN can be any node, even if is not the SQL active node.
• The CN uses SMB (Server Message Block) to manage the I/O between the storage and all the cluster nodes.
• All the metadata write is controlled by the CN.
© 201364
Clustered Shared Volume
• How it works?– CSVs are still on SAN.– The difference is the way they’re managed.
• Only one node is the owner – Coordinator Node
– CN can be any node, even if is not the SQL active node.
• The CN uses SMB (Server Message Block) to manage the I/O between the storage and all the cluster nodes.
• All the metadata write is controlled by the CN.
• The data I/O is directly passed to the shared storage.
© 201365
Clustered Shared Volume
© 201366
W2012SQL01 W2012SQL02
SAN
Coordinator Node
Clustered Shared Volume
© 201367
W2012SQL01 W2012SQL02
SAN
Coordinator Node
Metadata write
Request
Clustered Shared Volume
© 201368
W2012SQL01 W2012SQL02
SAN
Coordinator Node
Metadata write
Request
Metadata write
Clustered Shared Volume
© 201369
W2012SQL01 W2012SQL02
SAN
Coordinator Node
Metadata write
Request
Metadata write
Data I/O Data I/O
Clustered Shared Volume
• Advantages:– The storage is accessible from all nodes.
• To read and write!• SQL Server files are locked by the SQL process.
– Helps to increases the availability rate.
• The failover proccess faster.
– No need to mound disks.
• Alternative path is open.
© 201370
Clustered Shared Volume
• With CSV, another path to the shared storage is opened, helping to increase the availability. – This alternative path is opened in case of a fail.
– The cluster will use the less costly path to perform the I/O operations.
© 201371
Clustered Shared Volume
© 201372
W2012SQL01 W2012SQL02
SAN
Clustered Shared Volume
© 201373
W2012SQL01 W2012SQL02
SANData I/O
I/O request
Clustered Shared Volume
• CSV is a "NTFS reparse point”, so it’s presented like a mountpoint.– Is not mounted as a disk (not assigned to a letter).
– Accessible via %SystemDrive%\ClusterStorage.
© 201374
Conclusion
• Consider the TempDB in a local disk, when designing a SQL Server 2012 solution.
© 201375
Conclusion
• Consider the TempDB in a local disk, when designing a SQL Server 2012 solution.
• For non-mission critical instances, SMB File Share is a great option!– Also useful for emergencies.
© 201376
Conclusion
• Consider the TempDB in a local disk, when designing a SQL Server 2012 solution.
• For non-mission critical instances, SMB File Share is a great option!– Also useful for emergencies.
• Shared Storage is expensive, but still the best solution. © 201377
Conclusion
• Consider the TempDB in a local disk, when designing a SQL Server 2012 solution.
• For non-mission critical instances, SMB File Share is a great option!– Also useful for emergencies.
• Shared Storage is expensive, but still the best solution.
• CSV has all the advantages of a Shared Storage and increases the uptime.
© 201378
Thank you – Q&A
To contact
To follow
© 201379
@murilocmiranda
http://pt.linkedin.com/in/murilomiranda/
http://www.sql.pt/