How can I remove a broken FlexCache relationship in my FSx for ONTAP file system?

2 minute read
0

When I tried to dismantle my Amazon FSx for NetApp ONTAP file system, the deletion "stuck" due to left over dependencies and peering relationships.

Short description

You must delete SnapMirror, FlexCache, and peer relationships before you delete volumes. If you delete the volumes first, then you can't delete the FlexCache relationship because the destination volume is already deleted. And, you can't delete the origin volume because the FlexCache relationship is still in place.

Example 1

If you try to delete a FlexCache relationship after you delete the volume, then you receive the following error message:

"Error: command failed: Cannot delete volume your_volume> in Vserver your_vserver because it is not a Flexcache volume. Use the "volume delete -vserver your_vserver -volume your_volume" command to delete the volume"

Example 2

If you try to delete the volume using the command in the preceding error message, then you receive the following message:

"Error: command failed: Volume example_vol in Vserver example_vserver is an origin of a FlexCache volume. To delete an origin of a FlexCache volume you must first delete the FlexCache volumes that are in relationship with the origin. Use the "volume flexcache origin show-caches -origin-vserver example_vserver -origin-volume example_volume" command to show the FlexCache volumes associated with the origin"

Example 3

You enter the following command on the cache vserver after you delete your volume:

volume flexcache delete -vserver example_vserver2 -volume example_volume2

You receive the following error message:

"Error: There are no entries matching your query."

Note: To list the FlexCache volumes that are associated with the origin volume, run the following command:

::> volume flexcache origin show-caches -origin-vserver example_vserver -origin-volume example_volume

Resolution

Note: In the following commands, replace example_volume and example_server with the correct names for your use case.

To release a broken FlexCache relationship, run the following command:

::> set diag
:*> volume flexcache origin cleanup-cache-relationship -origin-vserver example_vserver -origin-volume example_volume -cache-vserver example_vserver2 -cache-volume example_volume2

To remove an unused peer relationship, run the following command:

vserver peer delete --vserver example_vserver -peer-vserver example_vserver -force true
AWS OFFICIAL
AWS OFFICIALUpdated 8 months ago