Skip to main content
NetApp Knowledge Base

How to use the Volume Recovery Queue

Views:
48,831
Visibility:
Public
Votes:
30
Category:
ontap-9
Specialty:
core
Last Updated:

Applies to

ONTAP 9

Description

A volume delete request against a volume that has type RW or DP (as seen in volume show command output) causes that volume to be moved to a partially deleted state. By default, it is retained in a recovery queue for at least 12 hours before being fully deleted

  • Deleting a FlexGroup volume in ONTAP 9.1 and above will move the member or constituent volumes to the volume recovery queue until the retention period expires.
  • As of 9.7 you can recover deleted volumes using System Manager ONTAP System Manager > Recover deleted volumes

Check Active IQ if this impacts your systems

Procedure

Deleting a volume

These actions are taken for any deleted volume added to the recovery queue:

  • Delete junction mapping (that is, volume unmount)
  • Delete LUN mappings
  • Delete snapshot policy
  • Delete export policy
  • Delete QOS policy
  • Delete quota policy rules
  • Volume state changed to 'pending delete'.  (Prevents on-lining volume and any other actions on the volume besides rename, recovery, and full destruction. Also hides the volumes from the output of many commands except while in diag privilege level.)
  • Volume is renamed.  (New volume name is formatted as '<oldname>_<DSID>') 
Volume count while in Recovery Queue

Volumes in this partially deleted state still exist in WAFL and other volume tables. Therefore, they still have to count towards the node and cluster limits on numbers of volumes and still participate in name and ID collision checks. However, they are not counted towards the maximum volumes count of the owning SVM

As these volumes still count towards the limits, they are included in the volume count reported in the storage aggregate show output, under all privilege levels

Aggregate Space used while in Recovery Queue

Volumes in the Recovery Queue continue to consume aggregate space. In order to avoid confusion about what is consuming aggregate space, the 'volume show-footprint' command will include partially deleted volumes in its output under all privilege levels

Volume Recovery Queue commands

Note:

  • Run all the following commands at diag privilege level
Recover a volume in the Recovery Queue

Recovering a partially deleted volume and restoring it to its original pre-deleted state is a multi-step process. This command will restore the volume back to its former type or RW or DP and leave it offline. It will not rename the volume back to its original name, or restore the junction path setting.  If you need to recover multiple volumes you can use '*' in the -volume parameter but you must specify each vserver individually with the -vserver parameter.  See the post recovery steps below after running this command in advanced privilege if using 9.11.1 and higher, or diag if using 9.10.1 or lower

::*> volume recovery-queue recover -vserver <vserver_name> -volume <volume_name>

Example:

::*> volume recovery-queue recover -vserver vs1 -volume vv4_1033
Volume recovery successful for volume "vv4_1033" in Vserver "vs1".

::*> vol recovery-queue show -vserver vs1
(volume recovery-queue show)
There are no entries matching your query.

Post recovery steps:

After using the recover command, the following steps must still be performed on the volume:

  1. Rename the volume using volume rename command

  2. Set up a junction, if required, running the volume mount command

  3. Create mappings for LUNs in the volume, if required, run the lun map command

  4. Associate a snapshot policy, an export policy with the volume, if required, with the volume modify command

  5. Add new quota policy rules for the volume, if required, with the quota policy rule command

  6. Add a QOS policy for the volume, if required, run the volume modify command

Note: When you bring a recovered volume online, there might be a temporary drop in performance for all volumes in the same aggregate

View Recovery Queue

To view information about volumes in the recovery queue:

volume recovery-queue show -vserver <vserver_name> -volume <volume_name>

Example:

::*> volume recovery-queue show -vserver vs1
Vserver Volume          Deletion Request Time    Retention Hours
------- --------------- ------------------------ ---------------
vs1     vol1_2147484675 Sat Jul 16 20:22:01 2011      12

Disable Recovery Queue

If volume-delete-retention-hours is set to zero, this feature will be disabled for that Vserver. Subsequent volume delete requests will completely destroy the volume and the volume will not be retained in a recovery queue. Disabling this feature is not recommended

::> set diag

::*> vserver modify -vserver <vserver_name> -volume-delete-retention-hours 0

Change volume retention time

Use this command to set the default retention duration (in hours) that deleted volumes will be retained in the recovery queue for recovery. The default value is 12 hours

::*> vserver modify -vserver <vserver_name> -volume-delete-retention-hours <integer>

Note: Value cannot be set to an interval less than 1 hour.

Example:

::> set diag

::*> vserver modify -volume-delete-retention-hours 8 -vserver vs1

::*> vserver show -fields volume-delete-retention-hours - vserver vs1
vserver volume-delete-retention-hours
------- -----------------------------
vs1                     8

Note: Modifying volume-delete-retention-hours and setting it to a new value only has an impact on future volume delete requests. It does not impact how long existing partially deleted volumes are retained.  

Change volume retention time while in recovery queue

This command allows changing the minimum retention time for a partially deleted volume. When deciding if a volume can be destroyed completely, the retention value is always used as the number of hours from the time the volume was deleted. Shortening the retention period can result in the volume being destroyed the next time the background volume reaper job runs, if doing so causes the sum of the retention time and the deletion time to be a time in the past. Extending the retention time is recommended if wafliron is running and a volume in the queue needs to be recovered, because recovery is not allowed while wafliron is running

::*> volume recovery-queue modify -vserver <vserver_name> -volume <volume_name> -retention-hours <integer>

Note: Value cannot be set to an interval less than 1 hour.

Example

::*> volume recovery-queue modify -vserver vs1 -volume vol1_2147484675 -retention-hours 4

::*> volume recovery-queue show -vserver vs1
Vserver Volume          Deletion Request Time    Retention Hours
------- --------------- ------------------------ ---------------
vs1     vol1_2147484675 Sat Jul 16 20:22:01 2011     4

Force volume delete

This command will force deletion of a volume in the recovery queue

::*> volume recovery-queue purge -vserver <vserver_name> -volume <volume name>

Or, to delete all volumes in recovery queue

::*> volume recovery-queue purge-all -vserver <vserver_name>

Example:

::*> volume recovery-queue purge -vserver vs1 -volume v1

Additional Information

Note: If a Cluster is Upgraded from ONTAP 8.2 to 8.3, the volume recovery queue is enabled for all previously created Storage Virtual Machine (SVM), however, the volume delete retention hours must be manually configured. An SVM created after upgrading to 8.3 will have the default of 12 hours of retention

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.