repartition windows server/sql server - options and alternatives

Posted on 2006-04-12
Last Modified: 2010-04-18
We have a tricky situation, and I need help reviewing possible approaches. I'll be splitting points for multiple answers and would really value a number of opinions.

Here's the deal: a few weeks ago, a client of ours ran out of space on her server. We've been warning her about it for months, but we've been ignored. Well, it happened, the server went down, and we were called in to fix it. Big surprise.

A little background: they try to do most of their server maintenance in house, and the server throws a couple dozen non-critical errors a day. Both my server guys say the server's a wreck, and they don't want to spend money for healthy server checkups. So we get called in to fix it when there are problems, which is rather frequent.

They run Windows 2003, with Exchange, with a resource-intensive business software system that uses SQL Server. They have two 80gb hard drives in mirrored RAID, split into two partitions: C drive for all the apps and app-related data, D drive for file storage only. The C drive is what ran out of space.

First question: what would YOU have done at this point?

We chose to repartition the C drive using Paragon Partition Manager. This seems to me like a very reasonable and responsible course of action, although certainly not ideal. It also had the advantage of being lost cost, both for software and our time. But things didn't go as planned. When the server came back up, the business software wouldn't run due to a SQL error--not a data error, but a SQL application error. At that point, we suspect reinstalling SQL server would have fixed it, but we had them call in their software consultants who knew the software.

Second question: any thoughts on why the repartition could have caused this problem? I know it's a broad question, but I really think this SHOULD have worked. Am I wrong?

And that's where we get into dualing opinions: the software consultants said we did a ridiculous thing and you should NEVER EVER repartition SQL server.

So, my third question: is there any reason that repartitioning SQL server is a no-no? Could this be a software specific thing or is there something obvious we missed?

Then the fun continued...they finally followed our advice to have another company come in and install a new server, just like we've recommended for months. More dualing opinions: the new tech company said they wouldn't have done a repartition, they would have simply ghosted the hard drive and replaced with two larger drives.

So, that's the third question: is this 20/20 hindsight or truly a better, cheaper approach? What are the pros and cons of that approach vs the repartition? If it's a recommended approach, what software/hardware would we need to do this efficiently in the future?

We're now in an uncomfortable spot because the business owner says we obviously were in over our heads and made a bad choice that caused her business to shut down for three weeks (the other tech company had some trouble moving Exchange to a new server--not our fault but we're getting blamed for that too!). Things really weren't down like she says--it was mainly her email that was the issue--but it's getting a little touchy.

If we really screwed up, tell me what we should have done. If you think we could have done something better, we'll add those ideas into our process, for any similar situations in the future. If what we did made perfect sense, tell me your experience and give me ammo to help me sort this out with the business owner.

Question by:cioservices
    LVL 15

    Accepted Solution

    Changing partition sizes is generally a quick and safe approach, if you have enough free space on another partition on the disk. I've done it many many times, mostly with Paragon Partition Manager (either run from a PPM Recovery CD or from a BartPE CD), and rarely had problems. When I have had problems, its been because of flakey hardware or corruption in the partition. It hasn't been an issue for me though, because I always take a forensic image of the disk before I do any partition mangling, so I can always restore the disk to exactly how it was before I started. You can reduce the chances of problems by first running a CHKDSK /F on all of the partitions, then defragging all of the partitions, then running a CHKDSK /F on all of the partitions again.

    To answer your questions:

    1. I would have restored the forensic image that I took beforehand.

    2. The repartition should have worked. As I've said, I've done the same thing many times without problems. I suspect that there was some data corruption, possibly caused by flakey hardware.

    3. There's no reason at all that repartitioning SQL server is a no-no, as long as the repartitioning isn't done from within Windows (it needs to be done in a standalone environment, such as from a PPM Recovery CD or from a BartPE CD). SQL doesn't care how big its partitions are or where on the physical disk its data is located.

    There are lots of ways that you could have gone about fixing the customers space issue. The option you chose was a reasonable one. Some other reasonable options would have been to:

    1. Image the partitions, replace the disks with larger disks, restore the images and expand the partition sizes in the process.
    2. Image the partitions, replace the disks with larger disks, restore the images (leaving the partition sizes the same), create a new partition in the free space, and move some data from C: (eg the pagefile) to the new partition.
    3. Leave the disks and partitions as they are and move some data from C: (eg the pagefile) to a partition with enough free space.
    4. Add an additional disk / RAID set and move some data from C: (eg the pagefile) to a partition on the additional disk / RAID set.

    Author Comment

    Thanks so much for the clear and thoughtful answer. I really appreciate the confirmation.

    May I ask what software and hardware you use for the forensic image? And about how long that would take on a nearly full 80gb mirrored raid?
    LVL 15

    Expert Comment

    I use a Linux boot CD, such as a Gentoo CD or a Red Hat Fedora Rescue CD, and use the dd utility. With a forensic image, it doesn't matter whether a disk is mostly empty or mostly full, it takes the same time to create / restore a forensic image, because every single sector is copied, from the first to the last. It would probably take about an hour to do an 80GB drive. Compressing the image takes longer, but how much longer is dependent on the speed of the CPU.

    eg to create an image of the first ide drive (hda) to a usb drive (sda) that's formatted as FAT32, you'd boot from a Linux CD and do the following:

    mkdir  /usbdrv
    mount  /dev/sda /usbdrv
    dd  if=/dev/hda  of=/usbdrv/disk0.dd  bs=512
    umount  /usbdrv

    To restore the image back:

    mkdir  /usbdrv
    mount  /dev/sda /usbdrv
    dd  if=/usbdrv/disk0.dd  of=/dev/hda  bs=512
    umount  /usbdrv

    If you want to create a compressed image, the dd command for creating the image is:

    dd  if=/dev/hda  bs=512  | gzip  -c  -9  >  /usbdrv/disk0.dd.gz

    To restore the compressed image, the dd command is:

    gzip  -c  -d  /usbdrv/disk0.dd.gz  |  dd  of=/dev/hda  bs=512

    Author Comment

    Darwin, thank you so much for all the help. I think the main thing we'll do differently in the future is take the forensic backup--or have the client sign off that they don't want it. I like your backup solution a lot--it's much faster than most options, and thus not so costly.

    Now hopefully I can settle things with our current client...I really appreciate the confirmation of our approach, the alternative choices, and the great explanation of all the various aspects. You earned your points!!!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
    This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now