Upgrade to larger drive

  • I have a drive D: with both the .mdf and .ldf files for a number of databases that's running out of space. I was wondering, if I:

    1. Stop the server
    2. Copy the files to an external drive
    3. Swap out the D: drive with a new one that's bigger
    4. Copy the files back
    5. Start the server

    And have my SQL Server instance be none the wiser?

    If not, I'll just backup and restore the databases (there's a lot of them), but then I was thinking the above approach may work just as well and be less time consuming.

    Thanks

     

    • This topic was modified 3 years, 8 months ago by  dpaproskijr.
  • Copy & swap should work. but don't forget to copy permissions too so that SQL Server has the same permissions to folders/files on the new drive.

  • Agree completely, it should work, as long as the drive has the same letter and paths, just verify that the needed permissions are all back in place.

     

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • When copying the files - you can use Robocopy with appropriate switched to copy the files and folders with permissions.  I just recently did this on a server where the original drives were created using an incorrect allocation unit.

    New drive(s) were added to the server - I shut down SQL Server, performed a copy using Robocopy to the new drive(s), changed the drive letter on the old drive to a non-used letter, changed the new drive to the original drive letter.  Once all drives were completed - restarted SQL Server.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • OK. Thanks for all the responses. We'll be doing this a couple times in next few weeks and if we have any issues, I'll report back.

     

  • All worked successfully.

     

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply