Table of ContentsView in Frames

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.

Before you begin

  • You must have the licensed_feature.disk_sanitization.enable option set to On.
    Attention: After disk sanitization is enabled on a storage system, it is permanent, and it prevents certain Data ONTAP commands from being run.
  • 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
  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 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.

    Example
    ndmpcopy /vol/nixsrcvol /vol/nixsrcvol_1
    For information about the ndmpcopy command, see the Data ONTAP Data Protection Tape Backup and Recovery Guide for 7-Mode.
    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_volvol destroy src_vol
  14. Enter the following commands to take the source aggregate offline and destroy it:aggr offline src_aggraggr 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
    Users who were accessing files in the original volume 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.