How can I recover a deleted FSx for ONTAP volume?

6 minute read
0

I want to recover an Amazon FSx for NetApp ONTAP volume that I accidentally deleted.

Short description

When you delete an FSx for NetApp ONTAP volume, the delete request completes the following actions:

  • Deletes all data in the volume.
  • Deletes all automatic backups.
  • Retains any user-initiated backups until you manually delete them.

To recover a volume, use one of the following methods:

  • Restore from a user-initiated backup.
  • Use AWS Backup to restore the volume.
  • Use the ONTAP recovery queue to restore the volume.

Resolution

Restore from a user-initiated backup

User-initiated backups never expire. User-initiated backups are retained after you delete the volume or the file system that the backups were taken on.

Note: When you delete a volume from the Amazon FSx console, you have the option to create a final backup of the volume. A final backup is considered a user-initiated backup.

To restore a volume from a user-initiated backup, complete the following steps:

1.    Open the Amazon FSx console.

2.    Choose Backups, and then select the backup that you want to restore the volume from.

3.    Choose Actions, Restore backup.

4.    In the Create volume from backup dialog box, enter a name for your volume.

5.    Enter the Junction path. The junction path is the location in your file system where your volume is mounted.

6.    Enter the Volume size, in megabytes (MB), of the file system that you want to restore.

7.    (Optional) Choose Enable storage efficiency to allow deduplication, compression, and compaction.

8.    Select your tiering preference for the volume from the Capacity pool tiering policy dropdown list.

9.    Verify your entries, and then choose Confirm.

10.    Choose Create backup.

Use AWS Backup to restore the volume

Backups that you create with AWS Backup are user-initiated backups. These backups are retained even if you delete the volume or the file system that the backups were taken on. To view and restore backups that you created with AWS Backup, use the Amazon FSx console, AWS Command Line Interface (AWS CLI), or API.

To restore an Amazon FSx for ONTAP volume from AWS Backup:

1.    Open the AWS Backup console.

2.    Choose Protected resources, and then select the Amazon FSx resource ID that you want to restore.

3.    On the Resource details page, choose the recovery point ID of the resource.

4.    Choose Restore. The File system details section displays the recovery point ID, the file system ID, and the file system type.

5.    Under Restore options, choose the File system from the dropdown list.

6.    Choose the preferred Storage virtual machine from the dropdown list.

7.    Enter a name for your volume.

8.    Enter the Junction Path. The junction path is the location in your file system where your volume is mounted.

9.    Enter the Volume size, in megabytes (MB), of the file system that you want to restore.

10.    (Optional) Choose Enable storage efficiency to allow deduplication, compression, and compaction.

11.    Select your tiering preference for the volume from the Capacity pool tiering policy dropdown list.

12.    In the Restore permissions section, choose the AWS Identity and Access Management (IAM) role that AWS Backup uses to restore backups.

13.    Verify your entries, and then choose Restore backup.

For more information, see Restoring an FSX file system.

Use the NetApp volume recovery queue to restore the volume

By default, deleted Amazon FSx volumes are retained in a recovery queue for at least 12 hours before they are fully deleted. You can use the volume recovery-queue recover ONTAP CLI command to recover the volume.

Note: If you used the -force flag in the volume delete ONTAP CLI command, then the volume bypasses the recovery queue. The command immediately deletes the volume, and you can't use this method to recover the volume.

To restore Amazon FSx for ONTAP volumes from the volume recovery queue, complete the following steps:

1.    Connect to your Amazon FSx file system. In the NetApp ONTAP CLI, run the set ONTAP CLI command to set the privilege level to advanced. Changes to privilege level settings apply only to the current session. These changes aren't persistent across sessions.

FsxIdxxxxxxx::> set -privilege advanced
Warning: These advanced commands are potentially dangerous; use them only when directed to do so by NetApp personnel.
Do you want to continue? {y|n}: y

2.    To view the details of partially deleted volumes, run the volume show-footprint ONTAP CLI command:

FsxIdxxxxxxx::> volume show-footprint


      Vserver : fsx
      Volume  : datavol_1028

      Feature                                         Used       Used%
      --------------------------------             ----------    -----
      Volume Data Footprint                           16.39GB       1%
             Footprint in Performance Tier
                                                      16.99GB     100%
             Footprint in FSxFabricpoolObjectStore
                                                           0B       0%
      Volume Guarantee                                     0B       0%
      Flexible Volume Metadata                        214.9MB       0%
      Delayed Frees                                   617.5MB       0%

      Total Footprint                                 17.20GB       1%

      Vserver : fsx
      Volume  : fsx_root

      Feature                                         Used       Used%
      --------------------------------             ----------    -----
      Volume Data Footprint                            7.66MB       0%
             Footprint in Performance Tier
                                                      17.39MB     100%
             Footprint in FSxFabricpoolObjectStore
                                                           0B       0%
      Volume Guarantee                                 1006MB       0%
      Flexible Volume Metadata                        10.50MB       0%
      Delayed Frees                                    9.73MB       0%

      Total Footprint                                  1.01GB       0%

Note: When you delete a volume, the volume state changes to pending delete and the volume is renamed. The new volume name is formatted as oldname_DSID. In the preceding example, the deleted volume is renamed datavol_1028. All junction mapping, snapshot policies, export policies, and so on, are deleted.

3.    To restore the volume, run the volume recovery-queue recover ONTAP CLI command:

FsxIdxxxxxxx::*> volume recovery-queue recover -vserver fsx -volume datavol_1028
Notice: When you bring a recovered volume online, there may be a temporary drop in performance for all volumes in the same aggregate.

Volume recovery successful for volume "datavol_1028" in Vserver "fsx".

Note: Make sure that you run the set command on the NetApp ONTAP CLI to set the privilege level. If you don't set the privilege, then the preceding command generates the error message "Error: "recovery-queue" is not a recognized command".

4.    To see the recovered volume, run the volume show ONTAP CLI command. The volume is in the offline state, as shown in the following example:

FsxIdxxxxxxx::*> volume show

Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
fsx       datavol_1028  aggr1       offline    RW         17GB          -     -
fsx       fsx_root     aggr1        online     RW          1GB    971.2MB    0%

5.    To bring the volume online and mount it, run the following ONTAP CLI commands:

FsxIdxxxxxxx::*> volume online datavol_1028
Volume "fsx: datavol_1028" is now online.

FsxIdxxxxxxx::*> volume mount datavol_1028 /fsx

Note: You must reconfigure all snapshot policies and export policy rules that were on the volume before it was deleted. To rename the volume to its original name, use the volume rename ONTAP CLI command. Volumes that you recover with the volume recovery-queue recover ONTAP CLI command aren't immediately visible in the Amazon FSx console. Recovered volumes appear in the volume show command output. You can access the volumes as a standard volume on the file system.

Related information

volume recovery-queue recover on the NetApp website

volume show-footprint on the NetApp website

volume rename on the NetApp website

Working with user-initiated backups

How to use the Volume Recovery Queue on the NetApp website

AWS OFFICIAL
AWS OFFICIALUpdated 7 months ago