Being able to migrate LUNs between Storage Pools or Raid Groups is a useful feature that has been around for a long time. It’s non-disruptive so you can do it anytime, but be careful with the rate. It’s A bit like SVMotion for array side storage ! (even though it predates VMWare of course). It’s also easily executed using Naviseccli.
Firstly I’m going to create a target LUN on a different Storage Pool on the Array. The target LUN must be the same size or larger than the source.
This new LUN is going to be 2TB, thin provisioned and be called “target_mig” into a Storage Pool with ID “5“. The tiering policy will be set to “Auto-Tier” and the initial data placement will be “Highest Available” which in this case will be SAS. After the migration completes, the name, id etc will be transferred across to the new LUN.
One point which can be useful. To execute this, you must know the ID of the Storage Pool where the target LUN will be created. Not often referred to, if you’re like me, you normally refer to the Pools by their “name”. Gold, Production Platinum, Tier 1, Slow, Angus….whatever !
To get a quick list, list the Storage Pool metadata to a text file, then retrieve the names using the powershell ‘get-content’ cmd piped through the ‘select-string’ cmd.
(I’m searching for ID and using the Context switch to retrun 2 lines before and after any match)
1 |
naviseccli -h arrayspa storagepool -list > h:\spool.txt ; get-content "spool.txt" | select-string -Pattern 'ID' -Context 2 |
Groovy. Pool ID 5 it is. Now let’s create our target LUN;
1 |
naviseccli -h arrayspa lun -create -type thin -capacity 2 -sq tb -poolId 5 -l 199 -name mig_target -tieringPolicy autoTier -initialTier highestAvailable |
No error returned so we’re good to check.
1 |
naviseccli -h arrayspa getlun 199 |
same from Unisphere;
Launch the migration task;
1 |
naviseccli -h arrayspa migrate -start -source 164 -dest 199 -rate medium |
Read any warning, act if necessary…then GO AT IT !
At 2TB and with the default priority of medium, it’s going to take a while, so strap yourself in. Or not.
Check the initial status;
1 |
naviseccli -h arrayspa migrate -list -source 164 |
I ain’t got time for this. Let’s crank it up a bit by raising the priority to ‘High’
1 |
naviseccli -h arrayvnx-spa migrate -modify -source 164 -rate high |
Better, so I’ll let it complete at that rate. Time for a sleep.
All finished;
How does it look from Unisphere? It looks sweet.
As part of the process, when the migration completes, the original source LUN will be deleted;
Enjoy.
I like this web blog it’s a master piece! Glad I noticed this on google.
Thanks so much regarding giving me an update on this matter on your site. Please realize that if a new post appears or when any modifications occur to the current article, I would want to consider reading more and finding out how to make good using of those techniques you talk about. Thanks for your efforts and consideration of others by making this blog available.
When i ran the below command, i am getting the error, can you please help?
PS C:\Program Files (x86)\EMC\Navisphere CLI> naviseccli -h 192.XXX.XXX.XXX -user sysadmin -password sysadmin -scope 0 storagepool -list > D:\spool.txt ; get-content “spool.txt” | select-string -Pattern ‘ID’ -Context 2
Get-Content : Cannot find path ‘C:\Program Files (x86)\EMC\Navisphere CLI\spool.txt’ because it does not exist.
At line:1 char:120 naviseccli -h 192.168.100.192 -user sysadmin -password sysadmin -scope 0 storagepool -list > D:\spool.txt ; get-content <<<
can you please help?
Hi Sandeep, just check your path and make sure your creating (via the tee >) the spool.txt to a valid location.