Deleting Nutanix Files Previous Version Snapshots
Nutanix Files can be configured for self-service restore. When a share is configured for SSR, the FSVM's will take internal snapshots of the shares. These snaps will consume storage, and may prevent free space from opening up when data has been removed from the share. To resolve this, you will need to use several afs commands to reclaim the storage and remove the snapshot.
- Connect via SSH to any FSVM in the Nutanix Files cluster. Be sure to connect using an IP from the Storage Network and not the Client network.
- List the snapshots for the share. The share name is case sensitive.
nutanix@FSVM$ afs snapshot.list share_name=<share_name>
#1: Snapshot Name: afs-auto-snap_weekly-2020-03-15-0700
Snapshot UUID: 05e65a80-36df-45a7-9032-87fa7296ef9a <<==== Snapshot UUID
Share Name: <sharename>
Type: SSR
#2: Snapshot Name: afs-auto-snap_daily-2020-03-17-0700
Snapshot UUID: f4d7d268-a90b-4288-b6c5-6fabfe264c0d
Share Name: <sharename>
Type: SSR
3. Identify the total amount of storage being consumed by the snapshot.
nutanix@FSVM$ afs snapshot.reclaimable_space <uuid_start>:<uuid_end>
Waiting for task completion: 3a74d663-ccca-4ab6-9ac4-ec203c6add64
Task status: kCalculateDiskSpace, Time elapsed: 0 sec
Execution time: 1 sec
Task passed: Reclaimable Space: 100 B
4. Remove the snapshots.
afs snapshot.remove snapshot_uuid_list=<snapshot_uuid1>,<snapshot_uuid2>
Deleting snapshot (01)- c072d2fd-8204-4a31-9d40-a0d7efb1b00d afs-auto-snap_hourly-2020-03-24-0400
Deleting snapshot (02)- 34b4f7bc-5db0-4f1b-82ae-1321ea96834c afs-auto-snap_hourly-2020-03-24-0500
Waiting for task completion: b8473fb5-9280-4678-8d35-9785a20c0b8a
Task passed. Deleted 2 snapshots.
Failed to delete 0 snapshots.
More details on this process can be found in Nutanix KB 5851.