January 18, 2008 at 2:50 pm
We have our SQL 2005 data on a SAN logical drive but would like to move it to a smaller partition. Could this be as "simple" as:
1. shutting down SQL
2. moving the directories to a temporary location
3. deleting the existing SAN partition and creating a new one with the SAME drive letter
4. moving the directories from step 2 to the new partition
5. start SQL back up
Being as the drive letter does not change, would this work?
Many thanks,
C. Marsh
January 19, 2008 at 1:06 pm
It could work. Then again it might not. Personally I wouldn't trust what someone told me about this if it were MY production environment we were talking about. Best thing for you to do is replicate this situation with a non-production test instance/database.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
January 19, 2008 at 5:09 pm
This absolutely should be tested, but if the drive letters are the same, you should be ok. SQL stores these in the master database, as seen by the OS.
To be extra safe, I might detach the databases, then reattach them once you have a new partition. That way you can be sure the pathing is the same.
And take a backup!
January 19, 2008 at 7:30 pm
your SAN (almost certainly) has tools to do this seamlessly
but as Steve says...make sure u have backups -- and make sure u know they are good
January 20, 2008 at 9:22 pm
Yeah, the SAN would be able to shrink to the size we need but I haven't found an easy way to make Windows aware of the change. Well, maybe with Partition Magic, but we don't have it. diskpart can be used to expand partitions, but not shrink them. Interestingly, Vista actually has a utility for doing such a thing. Maybe that will show up in Windows 2008.
I really appreciate everyones input on this question. I'll do more testing on Tuesday and post the results.
January 22, 2008 at 2:06 pm
Well, further testing confirms that it indeed will work to simply stop the SQL services, move the data to a temporary location, create a new partition of the correct size, move everything back and start SQL back up. Evidently SQL doesn't care as long and the drive letter remains the same.
One note. In a cluster environment, the physical disk resource for SQL will be broken and thus the cluster resource group will not work. You must create a new physical disk resource and then modify the dependant resources to map to the "new" drive. After doing that, the cluster came up OK.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply