• No results found

Removing data from disks using selective disk sanitization

The procedure you use to selectively sanitize data depends on whether your data is contained in FlexVol or traditional volumes.

Next topics

Selectively sanitizing data contained in FlexVol volumes on page 77 Selectively sanitizing data contained in traditional volumes on page 80

Related concepts

How selective disk sanitization works on page 35 How Data ONTAP works with disks on page 27

Selectively sanitizing data contained in FlexVol volumes

To selectively sanitize data contained in FlexVol volumes, you need to migrate any data you want to preserve in the entire aggregate, because every disk used by that aggregate must be sanitized.

• You must install a disk sanitization license on your storage system.

• You need enough free space to duplicate the data you want to preserve, plus extra space for overhead. If you have a limited amount of free space, you can decrease the size of the FlexVol volumes after you delete the data you do not want to preserve and before migrating the volume.

Steps

1. Stop any applications that write to the aggregate you plan to sanitize.

2. From a Windows or UNIX client, delete the directories or files whose data you want to

selectively sanitize from the active file system. Use the appropriate Windows or UNIX command, for example:

rm /nixdir/nixfile.doc

3. Remove NFS and CIFS access to all volumes in the aggregate.

4. From the Data ONTAP command line, enter the following command to delete all volume Snapshot copies of the FlexVol volumes that contained the files and directories you just deleted:

snap delete -V -a vol_name

vol_name is the FlexVol volume that contains the files or directories that you just deleted.

5. Note the names of the volumes that contain data you want to preserve.

6. Enter the following command for each volume you want to preserve, noting the total size and space used:

df -g vol_name

Managing disks | 77

7. If you do not have sufficient free space to create an aggregate to contain the migrated volumes at their current size, and the volumes have free space, enter the following command for each volume to decrease its size:

vol size vol_name new_size

Note: The new size must be larger than the used space in the volume.

8. Create an aggregate to which you will migrate the data you did not delete by entering the following command:

aggr create dest_vol disks Example

aggr create nixdestaggr 8@72G

This new aggregate provides a migration destination that is absolutely free of the data that you want to sanitize.

9. For each FlexVol volume that contains data you want to preserve, enter the following command to create a corresponding FlexVol volume in the new aggregate:

vol create dest_vol dest_aggrsize

dest_vol is the name of the new FlexVol volume. Use a different name for the new FlexVol volume.

dest_aggr is the aggregate you just created.

size must be at least as large as the current size of the FlexVol volume in the aggregate you will sanitize.

Example

To create a FlexVol volume to preserve the data in the nixsrcvol volume, which is a little more than 19 GB, you could use the following command:

vol create nixsrcvol_1 nixdestaggr 20G

You now have the volumes into which you will copy the data you want to preserve.

10. For each FlexVol volume that contains data you want to preserve, enter the following command to copy the data to the new aggregate:

ndmpcopy /vol/src_vol /vol/dest_vol

src_vol is the FlexVol volume in the aggregate you want to sanitize.

dest_vol is the new FlexVol volume that you just created that corresponded to the src_vol volume.

Attention: Be sure that you have deleted the files or directories that you want to sanitize from the source volume before you run the ndmpcopy command.

Example

ndmpcopy /vol/nixsrcvol /vol/nixsrcvol_1

For information about the ndmpcopy command, see the Data ONTAP Data Protection Tape Backup and Recovery Guide.

All of the data you want to preserve is now contained in the new aggregate.

11. List the disk IDs used by the source aggregate by entering the following command:

aggr status src_aggr -r Example

aggr status nixsrcaggr -r

The disks that you will sanitize are listed in the Device column of the aggr status -r output.

12. Record the disk IDs you listed in the previous step.

13. For each FlexVol volume in the aggregate you are sanitizing, enter the following commands to take the volume offline and destroy it:

vol offline src_vol vol destroy src_vol

14. Enter the following commands to take the source aggregate offline and destroy it:

aggr offline src_aggr aggr destroy src_aggr

The volumes and aggregate that housed the data you want to sanitize have been destroyed. The disks used in this aggregate are now hot spares.

15. Enter the following command to rename the new aggregate, giving it the name of the aggregate that you just destroyed:

aggr rename dest_aggr old_src_aggr_name Example

aggr rename nixdestaggr nixsrcaggr

16. For each FlexVol volume in the new aggregate, enter the following command to rename the FlexVol volume to the name of the original FlexVol volume:

vol rename dest_vol old_src_vol_name Example

vol rename nixsrcvol_1 nixsrcvol 17. Reestablish your CIFS or NFS services.

• If the original volume supported CIFS services, restart the CIFS services on the volumes in the destination aggregate after migration is complete.

• If the original volume supported NFS services, enter the following command:

exportfs -a

Managing disks | 79

Users who were accessing files in the original volume will continue to access those files in the renamed destination volume with no remapping of their connections required.

18. Follow the procedure for sanitizing disks on the disks that belonged to the source aggregate.

Related tasks

Removing data from disks using disk sanitization on page 74

Selectively sanitizing data contained in traditional volumes

To selectively sanitize data contained in traditional volumes, you migrate any data you want to preserve to a new volume, and then sanitize the disks that contained the old volume.

• You must install a disk sanitization license on your storage system.

• You need enough free space to duplicate the entire traditional volume you are performing the selective sanitization on, regardless of how much data you are deleting before migrating the data.

Steps

1. Stop any applications that write to the volume you plan to sanitize.

2. From a Windows or UNIX client, delete the directories or files whose data you want to

selectively sanitize from the active file system. Use the appropriate Windows or UNIX command, such as

rm /nixdir/nixfile.doc

3. Remove NFS and CIFS access to the volume you plan to sanitize.

4. Create a traditional volume to which you will migrate the data you did not delete by entering the following command:

aggr create dest_vol -v disks

Note: This traditional volume must have a storage capacity equal to or greater than the volume from which you are migrating. It must have a different name; later, you will rename it to have the same name as the volume you are sanitizing.

Example

aggr create nixdestvol -v 8@72G

This new volume provides a migration destination that is absolutely free of the data that you want to sanitize.

5. From the Data ONTAP command line, enter the following command to delete all volume Snapshot copies of the traditional volume that contained the files and directories you just deleted:

snap delete -V -a vol_name

vol_name is the traditional volume that contained the files or directories that you just deleted.

Example

snap delete -V -a nixdestvol

6. Copy the data you want to preserve to the destination volume from the volume you want to sanitize by entering the following command:

ndmpcopy /vol/src_vol /vol/dest_vol

Attention: Confirm that you have deleted the files or directories that you want to sanitize from the source volume before you run the ndmpcopy command.

src_vol is the volume you want to sanitize.

dest_vol is the destination volume.

For information about the ndmpcopy command, see the Data ONTAP Data Protection Tape Backup and Recovery Guide.

Example

ndmpcopy /vol/nixsrcvol /vol/nixdestvol

7. List the disks used in the source volume by entering the following command:

aggr status src_vol -r Example

aggr status nixsrcvol -r

The disks that you will sanitize are listed in the Device column of the aggr status -r output.

8. Record the IDs of the disks used in the source volume.

After that volume is destroyed, you will sanitize these disks.

9. Take the volume you are sanitizing offline and destroy it by entering the following commands:

aggr offline src_vol aggr destroy src_vol Example

aggr offline nixsrcvol aggr destroy nixsrcvol

10. Rename the new volume, giving it the name of the volume that you just destroyed, by entering the following command:

aggr rename dest_vol old_src_vol_name Example

aggr rename nixdestvol nixsrcvol

11. To confirm that the new volume is named correctly, list your volumes by entering the following command:

Managing disks | 81

aggr status old_src_vol_name 12. Reestablish your CIFS or NFS services.

• If the original volume supported CIFS services, restart the CIFS services on the volumes in the destination aggregate after migration is complete.

• If the original volume supported NFS services, enter the following command:

exportfs -a

Users who were accessing files in the original volume will continue to access those files in the renamed destination volume.

13. Follow the procedure for sanitizing disks to sanitize the disks that belonged to the source volume.

After sanitizing, the data that you removed from the source volume no longer exists anywhere on your storage system and cannot be restored.

Related tasks

Removing data from disks using disk sanitization on page 74

Related documents