How to use the Netapp ndmpcopy command

Author: NetworkAdminKB.com

Created: 2011-09-01

Modified: 2011-11-10

 

Information:

The ndmpcopy command has several uses the most common use is to copy or move a volume from different types of aggregates on the same Netapp controller or between Netapp Controllers.  The following are the general steps and associated perquisites needed to complete this type of operation.

 

Restrictions

  • Snapshots can’t be copied from the source volume to the target volume.
  • The console will not be available for other operations until the copy is completed.  This limits you to running one ndmpcopy command at a time.

 

Note: You can use Netapp Filerview or Netapp System Manager to perform most other steps, however all examples given are using the command line.

 

General Steps to follow

1)      Create the target volume that is >= the source volume

a.       Command line example

vol create target_volume aggr_01 100g

 

2)      Configure the target volume properties and settings just like the source volume or as desired.

a.       Command line examples of common settings to configure

snap reserve target_volume 0

vol options target_volume fractional_reserve 10

snap autodelete target_volume off

snap autodelete target_volume commitment try

vol autosize target_volume -m 200g -i 20g on

vol options target_volume try_first volume_grow

snap sched target_volume 0 0 0@0

 

3)      Make sure the target volume is online, bring online if needed.

a.       Example command to bring volume online

vol online target_volume

 

4)      If the source volume is currently in use, you should disable access, shutdown the server accessing the volume, remove the lun mapping, etc.  What you need to do will vary by your needs.  The general idea is to make sure no changes are being made to the volume while the copy is in progress.

 

5)      Start the copy process.

a.       Copy source volume to destination volume

ndmpcopy /vol/source_volume /vol/target_volume

 

Note: the volume names must be the fully qualified path (i.e. /vol/name).  Failure to specify the fully qualified path results in the following error message.

Ndmpcopy: Failed to start dump on source

 

Caution: If the destination is not given, it may result in corruption of the /vol/vol0/ which is the root volume and result in an unrecoverable damage.

 

6)      Monitor the copy process

a.       You will periodically see messages similar to the following on the console.

Ndmpcopy: netapp1: Log: RESTORE: Fri Sep 2 13:44:21 2011: We have read 78603246 KB from the backup.

 

b.      If the volume contains a LUN, you will receive the following message when the ndmpcopy is completed.

[netapp1: lun.newLocation.offline:warning]: LUN /vol/target_volume/lun00 has been taken offline to prevent map conflicts after a copy or move operation.

 

c.       Screenshot of Netapp Filerview showing the new LUN offline

 

                                                               i.      Verify no mappings are applied to the new lun and bring the lun online.

 

7)      Change configuration as needed to point to the new volume/lun.  This could be deleting and recreating the CIFS shares, changing the LUN mapping to the server, etc.  What configuration changes need to be completed will vary.  The general idea is to make sure the new volume is now being used and the old volume is not being used.

 

8)      Keep the old volume around as a fail safe for a few days or weeks as needed.

 

9)      Take the old volume offline and then delete

a.       Command line example.

vol offline source_volume

vol destroy source_volume

Type y to destroy the volume when prompted

 

10)  Using Netapp Filerview or Netapp System Manager rename the new volume to the old volume name if needed.

 

More Information:

To copy data between controllers/filers using ndmpcopy use the following command while logged into the source filer.

 

ndmpcopy -da username:password /vol/source_volume remote1:/vol/destination_volume

 

-da username:password = destination filer (remote1) username and password to login.

 

If the target volume is <= the source volume then messages similar to the following will appear in the console.

 

Ndmpcopy: netapp1: Log: RESTORE: We recommend that 11 inodes and 441320380 kbytes of disk space be available on the target volume in order to restore this dump. You have 14008215 inodes and 377477760 kbytes of disk space on volume /vol/target_volume

Ndmpcopy: netapp1: Log: RESTORE: This restore will proceed, but may fail when it runs out

of inodes and/or disk space on this volume.

 

 

Article ID: 461, Created On: 11/10/2011, Modified: 11/10/2011