Vous êtes sur la page 1sur 7

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

Index

SAN, NAS, and iSCSI (& SQL Server)


Published December 01, 2005
Dennis Forbes

Total Storage Management Platform Neutral SAN and NAS server EMC, NetApp, Veritas
www.MagniComp.com/sysinfo

A bit of an odd entry today, spurred by the general lack of awareness regarding these acronyms and their meaning: While they're undoubtedly old-hat for a database admin in a large enterprise (where they certainly play a critical role), they're less likely to be found amidst the parlance of smaller shops, or among professionals who function as hybrid developer/database architect/system architect. As many of the people who visit fall in those latter two categories, I thought it worth a quick overview. Even if you're a developer and these are all deployment concerns, you should know what the network guys are talking about when they discuss these concepts. All three acronyms exist in the world of segregated storage systems, which in a nutshell is the requisitioning of storage capacity separate from computational requirements: Instead of calculating each server's needs as an island, as a composite of computational and storage needs, you instead pool the storage requirements and facilitate that via one of these storage technologies. Pooling brings some advantages of scale, some technological advantages, not to mention that your capacity utilization and peak performance will likely improve. Segregated storage often allows for much greater scalability, allowing you to add disks and upgrades to the storage systems, transparently improving capacity and performance throughout the entire infrastructure (versus each system being an isolated performance unit). So a brief overview of what each of the acronyms means, and how it applies.

1 of 7

27/6/2555 21:27

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

NAS - Network Attached Storage

Network attached storage is generally used to describe servers (or "appliances") that are requisitioned for the sole purpose of being file servers, often running a lightweight or specialized NAS-specific operating system (for instance Windows Storage Server 2003, or a specialized version of Linux). NAS systems with massive capacities, often with redundancy such as RAID (Redundant Array of Inexpensive Disks - basically the system has redundancy such that one or more of the hard drives can completely fail with no loss of data, frequently exhibiting just a decrease in performance, but with no downtime: Usually you can plug a replacement drive in - while the system is running - and it'll automatally bring the new drive online and populated, restoring performance. I'm ignoring the misnomer "RAID 0", which is actually a performance technique that offers no redundancy), can be purchased for incredibly low prices these days, many of them - including those built on Windows Storage Server 2003 - with no additional licensing fees (e.g. you can add a huge-capacity NAS device to facilitate your entire enterprise with only the cost of the box itself - no additional per-user licensing issues). NAS systems generally support common file sharing protocols like CIFS/SMB (Windows), NFS (Unix/Linux), and so on, and usually integrate into Windows domains and Active Directory infrastructures for security purposes, so they seamlessly interoperate with your existing infrastructure. NAS is even making inroads in the home, with

2 of 7

27/6/2555 21:27

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

many alpha-geeks installing a very high capacity, high-performance NAS box for media files and centralized storage, supporting various other computing devices throughout the house.

Some NAS resources: Windows Storage Server vendors An inexpensive, high performance NAS starting point -(the same company makes a highly lauded solution for the home. ~$1000 for 1TB. Here's a good entry about that product) Iomega NAS servers Dell PowerVault 754N SQL Server 2000 I/O Configuration in a SAN/NAS Environment Wikipedia NAS entry
Apart from being a destination for backups, NAS can also host SQL Server databases themselves (e.g. your database server is running on server A, but the actual data is on server B, managed by server A over your high speed network), and with certified hardware (WHQL) this configuration is supported by Microsoft. To do so you just need to create or restore the database to a UNC location. e.g. CREATE DATABASE SampleUNCDatabase ON ( NAME = Sample_dat, FILENAME = '\\mynas\db\sample.mdf', SIZE = 10MB, MAXSIZE = 2000MB, FILEGROWTH = 10MB) LOG ON ( NAME = Sample_log, FILENAME = '\\mynas\db\sample.ldf', SIZE = 5MB, MAXSIZE = 25MB, FILEGROWTH = 5MB) Those of you playing along at home will have been surprized by the following error. Msg 5110, Level 16, State 2, Line 1 The file \\mynas\db\sample.mdf is on a network path that is not supported for database files. Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors. By default SQL Server doesn't support hosting databases on network locations, as there are some caveats that need to be considered (namely the throughput - NAS is accessed via a generalized file sharing protocol on top of a generalized transport protocol, often over

3 of 7

27/6/2555 21:27

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

a lower speed transport, and can kill database performance). You can enable UNC hosting by enabling trace flag 1807. Just make sure your NAS is accessed over a dedicated or low-usage Gbps or better network connection. e.g. DBCC TRACEON(1807) CREATE DATABASE... Success You can read more about this at http://support.microsoft.com /default.aspx?scid=304261. This configuration is supported with appropriate hardware (which generally means "running against an NAS that runs Windows 2003 Storage Server") NAS can not be used in SQL Server clustering scenarios. For that you need to look at a traditional or iSCSI SAN. As NAS is operating at a higher level, hiding the details of the underlying storage, to defragment an NAS device you would have to do it on the device itself, specific to that NAS. You could do backups on the NAS itself, though in-use files like SQL Server's data files would need agents to be backed up online. SAN - Storage Area Network

4 of 7

27/6/2555 21:27

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

While a NAS operates at a higher, more abstract level (the file share level, agnostic to the underlying file technologies and hiding the actual storage topology), in contrast a SAN functions at a much lower level. SANs operate at the virtual-disk access level, using block and "physical locations" to define what to read and write, with the client devices taking a more direct role in the "layout" (at least as far as the client is concerned) of the data: Client systems are allocated blocks of SAN storage - which usually appear as a bonafide drive on the client system (with appropriate drivers) - and are connected via a dedicated 1 to 4Gbps fibre network. Generally only one client can access a logical device on a SAN at a time, however with SQL Server clustering you can point several database servers at the same logical device, and if one fails the other one takes over the device (though it is still only one at a time). The protocol on the SAN fibre network is usually SCSI. SANs are generally very expensive, and are usually the domain of very large enterprises. As SANs operate at a much lower level, basically operating as a dumb bank of bits and blocks, these devices can become fragmented, though defragmentation would have to operate at the logical disk level, and generally needs to be performed by the PC that "owns" that logical disk. As SANs appear to the operating system as a disk - just as if it were an internal drive directly connected to the client - there are no limitations on its use beyond those that exist for a local drive. Many SANs have a value-add in the form of snapshot functionality, where they can take an image of a logical drive and store it somewhere else (perhaps as an online whole-volume backup). While this seems trivial, they can usually do it while the volume is online and being written to, via a transaction log sort of architecture. This can be very valuable in many scenarios.

Some SAN resources: Wikipedia entry on SANs Windows SAN Integration Technologies
iSCSI - internet SCSI (Small Computer System Interface)

5 of 7

27/6/2555 21:27

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

iSCSI is basically the SCSI disk control protocol over IP (internet protocol). The benefit being that you can access a storage device over anything that can relay IP, including ethernet, wireless, or even the public internet. Much like a SAN, iSCSI is a dumb-bag-of-bits, and the client that owns a block of data is responsible for its management. iSCSI has two real roles of interest: The target (the dumb-bag-of-bits that's listening and responding to iSCSI requests), and the initiator (the client computer, on which the virtual drive has been mounted). Initiators exist for virtually all modern operating system, and there are even targets for many operating system to allow them to operate as bags-of-bits (if you had a general purpose server with a huge array of under-utilized hard drives, and adequate network bandwidth, you could block some of that data to act as a storage drive for another server). Alternately there are dedicated network applications that act as iSCSI targets. iSCSI is appearing in some inexpensive forms, and most iSCSI solutions fall pricewise somewhere between NAS and SANs. Like SANs, many iSCSI solutions have snapshot functionality. Also like SANs, iSCSI storage networks can be used for Windows clustering solutions (as of a service pack to come in early 2006) - for instance in SQL Server clustering.

Some iSCSI resources Wikipedia entry on iSCSI

6 of 7

27/6/2555 21:27

SAN, NAS, and iSCSI (& SQL Server)

http://www.yafla.com/dennisforbes/SAN-NAS-and-iSCSI-SQL-Serv...

Microsoft iSCSI support (including initiator) Windows iSCSI target Free Linux iSCSI target Summary While this wasn't intended as a complete guide to these technologies, hopefully it has given enough of an overview that there is an appreciation of what they are, and how they might fit in most enterprises.

Other Notable Postings By Dennis W. Forbes . Also see the Papers section. What Is This?

(C) Dennis Forbes 2007

7 of 7

27/6/2555 21:27

Vous aimerez peut-être aussi