Home > SQL Server Tips > Database Administrator > Storage area network (SAN) basics every SQL Server DBA must know
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE ADMINISTRATOR

Storage area network (SAN) basics every SQL Server DBA must know


Denny Cherry
05.29.2008
Rating: -4.00- (out of 5)


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Database administrators take SQL Server storage for granted all too often. The storage area network (SAN) is something a lot of DBAs need to learn more about. By understanding the concept of SANs, we can better manage a SQL Server environment and create the best possible system performance for dollars spent.

Selecting your RAID level and storage tier

When requesting storage from your SAN admin or Windows admin, tell them what RAID level and storage tier you need. That's important because the RAID level determines just how much read and write I/O you need, as well as the amount of redundancy you require. For definitions of the various RAID levels that SAN arrays support, check out this tip I wrote on optimizing disk configuration in SQL Server. It's important that a DBA is involved in the decision process for RAID level volumes -- after all, you know the data within the system much better than any storage engineer does.

Knowing the storage tier that your data will be in (assuming that your storage administrator has set up tiered storage) will make you the storage administrator's best friend. Most databases fall into Tier 1 storage. Tier 1 storage is the fastest, most expensive storage in the system. Lots of Fibre Channel drives, probably 146 Gig or 300 Gig in size, go behind the database to make it run well. Tier 2 storage will usually be larger Fibre Channel drives. This storage is not as expensive and not as fast as they are allocating more data per spindle. Tier 3 storage is the least expensive storage. It is usually made up of very large, very inexpensive disks such as 750 SATA drives.

Note: This tiered layout is by no means a standard. Talk to your storage administrator and see what sort of layout he used.

If you know the system doesn't need to be ultra fast – it will only be used by a small number of people – then you might want to put the system onto Tier 2 storage. The storage won't be as fast as Tier 1, but you'll have built the system for a lot less money and left the Tier 1 storage for systems that need the blazing fast speed.

If you are going to use SATA drives for your database, be very careful. SATA drives perform great in desktop computers, but when you start placing several requests to them at a time, you won't get the performance you're looking for.

Don't be afraid to mix and match storage tiers in a single database system. If you have one drive that needs fast storage and a second drive that needs slower storage for archive data, then request storage from two different tiers. This way, you can get the storage you need and the storage admin can balance storage needs across the entire environment.

Redundancy is critical

When moving your local storage to a storage area network, redundancy -- both within the SAN array as well as the Fibre Channel – is critical to keeping your SQL Server up and running. Within the storage array itself, there should be several hot spare hard drives. For Fibre Channel drives, it's recommended to have one hot spare for every 30 Fibre Channel drives in the system (one hot spare per two shelves). For SATA drives, it's recommended to have one hot spare for every 15 drives (one hot spare per shelf). While this does reduce the amount of total usable storage within the array, it will allow your array to recover automatically from a disk failure.

Within the Fibre Channel fabric itself, all production systems should have two HBAs, with each HBA connected to a different Fibre Channel network. Then each Fibre network should be connected to the storage array. The Fibre networks should not be connected to each other. To remain redundant you have to keep them disconnected from each other. Connecting the networks will turn them into a single Fibre network. This will cause the entire Fibre network to go offline in the event that a single Fibre switch goes offline. When you look at your Fibre network, remember this: If a single Fibre switch goes offline, all Fibre switches connected to it will go offline. So be sure to keep those redundant networks separate.

Backups are no less important

Just because the databases are stored on the SAN, backups are just as important as always. While the SAN environment is very redundant and multiple drive failures are rare, they are still possible. And so is data corruption or accidental data deletion by a user.

However, because you are storing your data on a SAN, you have an option called snapshots. Snapshots in the SAN world are different from snapshots in the database world. In the SAN world, a snapshot means taking an exact duplicate of the LUN, which is presented to the host. Vendors do this slightly differently, so be sure to read
More on SANs and SQL Server performance:
  • SQL Server backups using SAN snapshots
  • SAN considerations for your SQL Server environment
  • Configuring SANs for SQL Server performance
  • up on what you're getting before you decide to use this method. When using SAN snapshots, make sure the storage array supports consistency groups. An array uses consistency groups to ensure that all the disks are in a consistent state when backed up. This is extremely important in the database world because if the files are out of sync, you won't be able to reattach them.

    You also need to know in what state the backup will be restored. There are basically two options: crash recoverable and crash restartable. A crash recoverable backup looks to the SQL Server as if the power cable was pulled from the system, then a backup was taken. A crash restartable backup looks to the SQL Server as if the SQL Server was stopped, then the backup was taken. A crash restartable restore has a much better chance of restoring than a crash recoverable database.

    The SAN is not a magical device

    Many IT folks treat SANs as if they are the solution to every problem. I've heard time and time again, "Just stick it on the SAN, that'll fix the performance problem." While this can be the case, it's not the right technique. The SAN is a powerful tool, but you need to manage it correctly. Unless you are spending huge amounts of money on your SAN, it's not going to self-diagnose or self-heal (except for failed hard drives). It's not going to find the parts that are overused and move the data somewhere else. That needs to be done manually. Be wary of SANs that claim to do this automatically, as they may end up spending more time cleaning themselves up than actually serving I/O requests. I've heard horror stories of SANs running at peak capacity, and when you look into the system, it's spending 80% of the time trying to optimize itself and only 20% of the time serving I/O requests.

    As a DBA, be aware of all these things when working with your SAN array. SQL Server MVP Hilary Cotter has an excellent tip on SAN considerations, which goes over several other items.

    Work with your storage engineer. He's there to work with you, not against you. After all, you both have the same goal: to get the systems up and running the best you can with the budget you've been given.

    ABOUT THE AUTHOR:   
    Denny Cherry has over a decade of experience managing SQL Server, including MySpace.com's more than 175-million-user installation, one of the largest in the world. Denny's areas of expertise include system architecture, performance tuning, replication and troubleshooting. He uses these skills in his role as a senior database administrator and architect at Awareness Technologies. Denny is a longtime member of PASS and Quest Software's Association of SQL Server Experts and has written numerous technical articles on SQL Server management.
    Check out his blog: SQL Server with Mr. Denny


    Rate this Tip
    To rate tips, you must be a member of SearchSQLServer.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


    RELATED CONTENT
    Strategy and planning
    Virtual database storage for SQL Server: Friend or foe?
    SQL Server high availability when upgrading to SQL Server 2005
    Secure SQL Server from SQL injection attacks
    How insiders hack SQL databases with free tools and a little luck
    Tips for moving from SQL Server local disk storage to SANs
    Sarbanes-Oxley compliance checklist: IT security and SQL audits
    SQL Server PerfMon counters for access methods and buffer manager
    Find size of SQL Server tables and other objects with stored procedure
    Monitor SQL Server disk I/O with PerfMon counters
    Tips for scheduling and testing SQL Server backups

    SQL Server installation
    Virtual database storage for SQL Server: Friend or foe?
    Tutorial: Migrating to SANs from local SQL Server disk storage
    How to restore SQL Server database to transition server during upgrade
    Tips for moving from SQL Server local disk storage to SANs
    SQL Server 2005 log shipping setup using the wizard
    SQL Server tools don't appear in menu after SQL Server 2005 install
    Troubleshoot SQL Server 2005 SP2 installation error
    Configuring SQL Server memory settings
    Optimize SAN setup for improved SQL Server performance
    Code to connect SQL Server 7.0 to Visual Basic 6.0
    SQL Server installation Research

    SQL Server overview
    Should you upgrade to SQL Server 2005 or SQL Server 2008?
    SQL Server data conversions from date/time values to character types
    Using full-text search for symbols in SQL Server
    SQL and SQL Server Tutorial and Reference Guide
    How to use the SELECT statement in SQL
    Translating information requests into SQL SELECT statements
    SQL SELECT statement and SELECT query samples
    Using the ORDER BY clause of the SELECT query in SQL
    Using DISTINCT in SQL to eliminate duplicate rows
    Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
    SQL Server overview Research

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    application server  (SearchSQLServer.com)
    comma-separated values file  (SearchSQLServer.com)
    DDBMS  (SearchSQLServer.com)
    entity-relationship model  (SearchSQLServer.com)
    full-text database  (SearchSQLServer.com)
    intelligent database  (SearchSQLServer.com)
    OLE DB  (SearchSQLServer.com)
    Quiz: Database Basics  (SearchSQLServer.com)
    relational database management system  (SearchSQLServer.com)
    SQL Server  (SearchSQLServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts