Table of Contents
How To Use NDMPcopy To Move LUNs/RDMs To A Different Volume or Filer
Summary: How To Use NDMPcopy To Move LUNs/RDMs To A Different Volume or Filer.
Date: Around 2013
Refactor: 7 March 2025: Checked links and formatting.
While installing and configuring Site Recovery Manager 5.1 I came across a few VMs that had to be protected that also had RDMs. The volumes they were located in were not suitable for replication which meant I had to move them to different volumes and sometimes even to different filers. This is quite easily done using ndmpcopy. This article describes the procedure for moving RDMs that are part of a Microsoft Cluster to a different volume on the same filer as well as to a different filer.
Note that all storage is located on NetApps.
Also note that this article assumes that all required volumes and datastores are already created, as well as correct initiatorgroups, zoning etc.
Procedure Overview
The procedure to move the RDMs is:
- Power off the Microsoft cluster passive node, then power off the active node
- Remove the RDMs from the VMs. Note that you need to remove them from the VM, not delete them from disk.
- Move the VM (without the RDMs) to the new target datastore using storage vMotion
- Turn on NDMP daemon
- Ndmpcopy the RDMs to the target
- Turn off the NDMP daemon
- Optional: Rename the new RDMs to reflect changed volume, filer etc.
- Offline old RDMs
- Online new RDMs
- Set initiatorgroup and lun mapping
- Power on Microsoft cluster active node, then power on the passive node
- Check your work and test the cluster
- Remove old RDMs
Using The NDMPcopy Command
Before you can use ndmpcopy you'll need to enable the ndmp daemon (ndmpd):
ndmpd on
You can use ndmpcopy to copy to a volume on the same filer, or to copy to a volume on a different filer. The commands are different in that you need to provide authentication if copying between filers.
Copy to a different volume:
ndmpcopy /vol/sourcevolume/sourcerdm /vol/targetvolume/
Note that you don't add the rdm / lunname to the target. If you do so, this will be interpreted as a qtree.
Copy to a different filer:
ndmpcopy -sa root:xxxxxx -da root:xxxxxx sourcefiler:/vol/sourcevolume/sourcerdm targetfiler:/vol/targetvolume/
- -sa: source filer authentication
- -da: target filer authentication
Note that you can start this command from either filer.
Example:
ndmpcopy -sa root:xxxxx -da root:xxxxxx filer01b:/vol/OLD_RDM_VOLUME/OLD_RDM_LUN filer01a:/vol/NEW_RDM_VOLUME/ filer01a> ndmpd on filer01a> ndmpcopy -sa root:openit -da root:openit filer01b:/vol/OLD_RDM_VOLUME/OLD_RDM_LUN filer01a:/vol/NEW_RDM_VOLUME/ Ndmpcopy: Starting copy [ 0 ] ... Ndmpcopy: filer01b: Notify: Connection established Ndmpcopy: filer01a: Notify: Connection established Ndmpcopy: filer01b: Connect: Authentication successful Ndmpcopy: filer01a: Connect: Authentication successful Ndmpcopy: filer01b: Log: DUMP: creating "/vol/OLD_RDM_VOLUME/../snapshot_for_backup.1029063" snapshot. Ndmpcopy: filer01b: Log: DUMP: Using Partial Volume Dump of selected subtrees Ndmpcopy: filer01b: Log: DUMP: Date of this level 0 dump: Sun Feb 24 08:15:44 2013. Ndmpcopy: filer01b: Log: DUMP: Date of last level 0 dump: the epoch. Ndmpcopy: filer01b: Log: DUMP: Dumping /vol/OLD_RDM_VOLUME/OLD_RDM_LUN to NDMP connection Ndmpcopy: filer01b: Log: DUMP: mapping (Pass I)[regular files] Ndmpcopy: filer01b: Log: DUMP: Reading file names from NDMP. Ndmpcopy: filer01b: Log: DUMP: mapping (Pass II)[directories] Ndmpcopy: filer01b: Log: DUMP: estimated 27536080 KB. Ndmpcopy: filer01b: Log: DUMP: dumping (Pass III) [directories] Ndmpcopy: filer01b: Log: DUMP: dumping (Pass IV) [regular files] Ndmpcopy: filer01a: Log: RESTORE: Sun Feb 24 08:16:23 2013: Begin level 0 restore Ndmpcopy: filer01a: Log: RESTORE: Sun Feb 24 08:16:30 2013: Reading directories from the backup Ndmpcopy: filer01a: Log: RESTORE: Sun Feb 24 08:16:37 2013: Creating files and directories. Ndmpcopy: filer01a: Log: RESTORE: Sun Feb 24 08:16:39 2013: Writing data to files. Ndmpcopy: filer01b: Log: DUMP: Sun Feb 24 08:21:12 2013 : We have written 10157117 KB. Ndmpcopy: filer01a: Log: RESTORE: Sun Feb 24 08:21:14 2013 : We have read 10275356 KB from the backup. Ndmpcopy: filer01b: Log: DUMP: Sun Feb 24 08:26:12 2013 : We have written 21454621 KB. Ndmpcopy: filer01a: Log: RESTORE: Sun Feb 24 08:26:14 2013 : We have read 21560102 KB from the backup. Ndmpcopy: filer01b: Log: ACL_START is '28087325696' Ndmpcopy: filer01b: Log: DUMP: dumping (Pass V) [ACLs] Ndmpcopy: filer01b: Log: DUMP: 27429476 KB Ndmpcopy: filer01b: Log: DUMP: DUMP IS DONE Ndmpcopy: filer01a: Log: RESTORE: RESTORE IS DONE Ndmpcopy: filer01a: Notify: restore successful Ndmpcopy: filer01b: Log: DUMP: Deleting "/vol/OLD_RDM_VOLUME/../snapshot_for_backup.1029063" snapshot. Ndmpcopy: filer01b: Log: DUMP_DATE is '5656657440' Ndmpcopy: filer01b: Notify: dump successful Ndmpcopy: Transfer successful [ 0 hours, 13 minutes, 10 seconds ] Ndmpcopy: Done filer01a>
Disable the ndmp daemon (ndmpd) afterwards:
ndmpd off
Extra Information
If you're working with RDMs in a vSphere 5.1 environment you'll notice that the ESXi hosts will become slow when scanning datastores, HBA adapters, refreshing storage and while booting. Read and run this script to prevent this.