Subscribe

How to migrate SQL Server database from one LUN to another in same Volume?

[ Edited ]

I allocated too much storage to a LUN that contains one of my databases. The FlexVol that houses the LUN has also been sized too large, and I want to reclaim some of that aggregrate storage for other volumes.

I understand that I should not reduce the size of the LUN. I am planning to use SnapDrive create a new LUN within the same Volume, move the database to the new LUN, then destroy the old LUN, then reduce the size of the Volume.

I'm wondering if these are the steps I should take?:

- use SnapManager to move the database to a local drive

- delete the existing LUN (how to do this??? - never needed to kill a LUN)

- recreate a new smaller LUN using SnapDrive

- migrate the new "local" database onto the recreated LUN.

Are there any gotchas that I should watch out for, or any guidance anybody has on this procedure for a newbie?

Thanks,

Normajean

Re: How to migrate SQL Server database from one LUN to another in same Volume?

Hi,

Your steps are all fine. For deleting a LUN use SDW, it is safer and error-free that way.

I would also suggsest that you create a native SQL Server backup of the database before hand if this is a production database.

This is just incase the migration process fails. If the database is too large and your maintainance window is relatively small then uncheck the option to run "DBCC CHECKDB" before and after the migration in the SMSQL configuration wizard.

Regards,

Sourav Chakraborty

Technical Marketing Engineer (SMSQL , SMMOSS)

Contact: +91 80 4184 3482

Cell: +91 9739090394

Email: sourav.chakraborty@netapp.com

Re: How to migrate SQL Server database from one LUN to another in same Volume?

I had to do this last month on a clustered SQL box - What sourav chakraborty said will work.

Create new LUN

Stop SQL server

Copy data from old LUN to new LUN

Confirm copy correct

Disconnect new LUN {DO NOT DISTROY!}

Take old LUN out of SQL server dependancy

Take the drive out of cluster with snapmanager

Rename old lun to another name

Rename new lun to match you naming standard

Mount New LUN into cluster with snapmanger and old LUNs drive letter

Add as SQL dependancy

Start SQL server

Confirm every thing is good

Delete old LUN