repartition windows server/sql server - options and alternatives

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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cioservicesAuthor Commented:
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?
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
cioservicesAuthor Commented:
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!!!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.