SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

netapplunmove

NetApp: Rename a LUN

When you manage a NetApp filer and because of new insights or new organizational names (or even maybe typos) you need to change the names of your volumes and LUNs you might be surprised at how easy that is. I, and I think most Administrators, use FilerView as the main administrative tool. Since there is a rename button for your volumes there I won't talk about that. There ain't however a rename button for your LUNs but there are two easy ways for renaming them without downtime for your storage consumers. The first option is to use the command “lun move” from the commandline, the other one is to use the PowerShell cmd-lets provided by NetApp. See below for more information about these two methods:

Command LUN Move

See the help for the command on how to use it:

filer01> help lun move
lun move <lun_path> <to_lun_path>
  - rename a LUN. Both paths must be in the same volume.

So, easy enough. Just do it:

filer01> lun move /vol/volume03/ACC_153 /vol/volume03/filer01_153_SATA_ACC

It didn't even take a second!!! Then, because I was testing anyway, I moved a VM with a webserver onto the storage and retried renaming it again for a couple of times. There were no problems at all.

Command Rename-NaLun

This is the powershell command for exactly the same functionality, and it also has a help function:

[vSphere PowerCLI] D:\sjoerd> Import-Module d:\sjoerd\dataontap
[vSphere PowerCLI] D:\sjoerd> Get-Help Rename-NaLun
 
NAME
    Rename-NaLun
 
SYNOPSIS
    Move (rename) a LUN.
 
 
SYNTAX
    Rename-NaLun [-Path] <String> [-NewPath] <String> [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParamet
    ers>]
 
 
DESCRIPTION
    Move (rename) a LUN.
 
 
RELATED LINKS
    Get-NaLun
 
REMARKS
    To see the examples, type: "get-help Rename-NaLun -examples".
    For more information, type: "get-help Rename-NaLun -detailed".
    For technical information, type: "get-help Rename-NaLun -full".
 
[vSphere PowerCLI] D:\sjoerd> Get-Help Rename-NaLun -examples
 
NAME
    Rename-NaLun
 
SYNOPSIS
    Move (rename) a LUN.
 
    --------------  Example 1 --------------
 
    C:\PS>Rename-NaLun /vol/vol2/lun100 /vol/vol2/lun101
 
 
    Rename LUN 'lun100' to 'lun101'.
 
 
    BackingSnapshot           :
    BlockSize                 : 512
    IsSpaceReservationEnabled : True
    Mapped                    : False
    MultiprotocolType         : image
    Online                    : False
    Path                      : /vol/vol2/lun101
    ReadOnly                  : False
    SerialNumber              : abcdefghijkl
    ShareState                : none
    Size                      : 2000683008
    Uuid                      : d44cf834-180e-11df-9cab-00a09806c227
    Comment                   :

So, just fire it up:

[vSphere PowerCLI] D:\sjoerd> Connect-NaController filer01 -credential (get-credential)
 
Name                 Address           Ontapi   Version
----                 -------           ------   -------
filer01              10.10.10.10       1.12     Data ONTAP Release 7.3.4: Thu May 27 18:22:11 PDT 2010 (IBM)
 
 
[vSphere PowerCLI] D:\sjoerd> Rename-NaLun /vol/volume03/filer01_153_SATA_ACC /vol/volume03/filer01_15300_SATA_ACC
 
Path                                      TotalSize   SizeUsed Protocol     Online Mapped  Thin  Comment
----                                      ---------   -------- --------     ------ ------  ----  -------
/vol/volume03/filer0115300_SATA_ACC       400.0 GB   323.5 GB  vmware        True   True   True  LUN for ESX

This command took a bit longer but worked just as well. If you need just one or two renames I would use the lun move command, and use the powershell if you need it to be inside a script or anything.

You could leave a comment if you were logged in.
netapplunmove.txt · Last modified: 2021/09/24 00:24 (external edit)