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

User Tools

Site Tools



Would you like to sponsor this site?
Or buy me a beer?:

Recently Changed Pages:

View All Pages
View All Q Pages

View All Tags

Sign up for Q to post comments.

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.

Terms And Conditions for Q users

Pages with comments

2019/05/01 14:08 2 Comments
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments


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
    Move (rename) a LUN.
    Rename-NaLun [-Path] <String> [-NewPath] <String> [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParamet
    Move (rename) a LUN.
    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
    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           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: 2013/04/20 09:45 by sjoerd