Skip to main content

NetApp

ONTAP Aggregate Destroy and Recreate Runbook

NetApp guide — Storage KnowHow

Destructive Change Warning

Deleting an aggregate is destructive. NetApp documents that storage aggregate delete deletes a storage aggregate and fails if volumes are present. It also notes that if an object store is attached, aggregate deletion deletes objects in the object store: storage aggregate delete.

Use this runbook only after all data has been migrated, protected, or explicitly approved for deletion.

Prechecks

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Stop if any user, root, DP, clone, or system volume still depends on the aggregate.

CLI Destroy Process

Confirm no volumes remain:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Offline the aggregate if required by your procedure:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Delete:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Verify:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

CLI Recreate Process

Create the replacement aggregate according to platform standards. In a lab simulator, this might be a small RAID-DP aggregate. In production, follow platform, disk class, RAID size, encryption, and ADP standards.

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Validate:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

REST API Process

Collect aggregate evidence before destruction:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Delete only after the volume query returns no dependent volumes and the change is approved:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Create replacement aggregate where supported by your ONTAP release:

curl -k -u admin:'<password>' \
  -X POST \
  "https://cluster.example.com/api/storage/aggregates" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "aggr_new01",
    "node": { "name": "node01" },
    "block_storage": { "primary": { "disk_count": 10, "raid_type": "raid_dp" } }
  }'

Best Practices

Backout

After an aggregate is deleted, backout is restore or recreate, not undo. The real rollback is the migration, backup, or replication copy you validated before deletion.

Comments