Tuesday, January 28, 2020

How To Move Volumes from One SVM to Another SVM Netapp - Rehost

volume rehost - Rehost a volume from one Vserver (SVM) into another Vserver (SVM)

This command is available to cluster administrators at the admin privilege level.

The volume rehost command rehosts a volume from source Vserver onto destination Vserver. The volume name must be unique among the other volumes on the destination Vserver.

 Before re-hosting the volume you have to verify whether it is hosting NFS, CIFS Or LUN, accordingly you have to perform the volume re-host process

Netapp volume rehost Pre-checks

  • Release snapmirror relationships if any associated with volume
  • Un-Mount the volume
  • Excute rehost volume command
  • remount and remap the LUN's
  • Create CIFS shares
  • Create export policies
    Before moving the volume SVM (Vserver)  should have similar protocols enabled otherwise rehost will fail
ARKIT-NA::*> volume rehost -vserver ARKIT-SVM -volume Volume1 -destination-vserver ARKIT-SVM

Warning: Rehosting a volume from one Vserver to another Vserver does not change the security information on that volume.
         If the security domains of the Vservers are not identical, unwanted access might be permitted, and desired access might be denied. An attempt to rehost a volume will disassociate the volume from all
         volume policies and policy rules. The volume must be reconfigured after a successful or unsuccessful rehost operation.
Do you want to continue? {y|n}: y
[Job 23760] Job is queued: Volume rehost operation on volume "Volume1" on Vserver "ARKIT-SVM" to destination Vserver "ARKIT-SVM" by administrator "admin".

Error: command failed: [Job 23760] Job failed:
       Volume rehost pre-check failed for reasons:


       Cannot rehost volume "Volume1" on Vserver "ARKIT-SVM" because the volume is type "RW" and is in a SnapMirror relationship. To rehost the volume, use the "snapmirror delete"
       command on the destination volume, followed by "snapmirror release -relationship-info-only" on the source volume, and then try the command again.



Step1: volume unmount -vserver ARKIT-SVM -volume Volume1

Step2: set -privilege advanced


Step3: volume rehost -vserver ARKIT-SVM -volume Volume1 -destination-vserver ARKIT-SVM1


Do you want to continue? {y|n}: y
[Job 23761] Job succeeded: Successful


Step 4: volume show -fields junction-path -vserver ARKIT-SVM1


volume mount -vserver ARKIT-SVM1 -volume Volume1 -junction-path /Volume1


Explanation: Un-mount the volume and change to advanced privilege mode. Execute rehost of the volume. 

After successful rehost operation check volume is mounted on destination if not we have to mount it back.

in case of volume hosting LUN's use -force-remap-luns true option.

More options


-vserver <vserver name> - Source Vserver name
         This specifies the Vserver on which the volume is located.

-volume <volume name> - Target volume name
         This specifies the volume that is to be rehosted.

-destination-vserver <vserver name> - Destination Vserver name
         This specifies the destination Vserver where the volume must be located post rehost operation.

{ [-force-unmap-luns {true|false}] - Unmap LUNs in volume
           This specifies whether the rehost operation should unmap LUNs present on volume. The default setting is false (the rehost operation shall not unmap LUNs). When set to true, the command will unmap
           all mapped LUNs on the volume.

| [-auto-remap-luns {true|false}] } - Automatic Remap of LUNs
           This specifies whether the rehost operation should perform LUN mapping operation at the destination Vserver for the LUNs mapped on the volume at the source Vserver. The default setting is false
           (the rehost operation shall not map LUNs at the destination Vserver). When set to true, at the destination Vserver the command will create initiators groups along with the initiators (if present)
           with same name as that of source Vserver. Then the LUNs on the volume are mapped to initiator groups at the destination Vserver as mapped in source Vserver.




Join Telegram Group