SafeDisk AI

VTOrc Primary Disk Full Recovery

When a Vitess or MySQL PRIMARY tablet fills its datadir, orchestration can see downstream noise first: stopped replication, hung writes, transaction errors, and lag. The useful root cause is sharper: is there a healthy replica with free disk that can safely become primary, or should VTOrc only surface a PrimaryDiskFull analysis until an operator frees space?

Ask free AI judgment

Find what you can delete.

Leave your email now. The scan summary can follow after the first reply; we send the free SafeDisk AI deletion trial step only if deletion risk is still unclear.

Add command output optional

Free trial step. We reply first with a delete / confirm / protect judgment or one read-only detail we still need.

See sample result Ask AI about one file

Runbook: Reparent Only When The Target Is Safer

  1. Confirm the PRIMARY tablet is actually disk-full. Do not infer from replication lag alone.
  2. Record both byte pressure and inode pressure for the datadir filesystem. Either can stop writes.
  3. Capture the recent MySQL or tablet log lines that prove ENOSPC, errno 28, or equivalent write failure.
  4. Classify replicas by reachability, mysqld health, datadir free space, and replication freshness.
  5. Permit automated reparent only when a candidate replica is non-full and fresh enough for the shard policy.
  6. If no candidate is safe, surface PrimaryDiskFull as root cause and require operator action before topology movement.
Copy-ready issue reply

Use this when VTOrc sees disk-full primary symptoms.

This keeps the change focused on analysis and recovery safety, instead of turning every downstream replication symptom into a reparent attempt.

I would model this as a two-branch analysis: PrimaryDiskFullRecoverable and PrimaryDiskFullInformational.

Read-only evidence before any cleanup or topology change:

PRIMARY_DATADIR=<primary-datadir>
df -h "$PRIMARY_DATADIR" .
df -i "$PRIMARY_DATADIR" .
du -h -d 1 "$PRIMARY_DATADIR" 2>/dev/null | sort -h | tail -40
mysql -e "SHOW VARIABLES WHERE Variable_name IN ('datadir','log_bin','relay_log','gtid_mode'); SHOW BINARY LOGS;"
mysql -e "SHOW REPLICA STATUS\G" 2>/dev/null || mysql -e "SHOW SLAVE STATUS\G" 2>/dev/null || true

Recovery rule: reparent only if a reachable replica has non-full datadir, healthy mysqld, and acceptable replication position. If every reachable replica is full, stale, or unhealthy, emit the root-cause signal without automated reparent so an operator can free space safely.

Do Not Delete First

Free AI deletion trial

Need a delete / confirm / protect answer?

Send the issue link, log excerpt, or storage summary first. We reply with the next safe move and offer the free SafeDisk AI deletion trial only if the incident still needs review.

Add output optional

Start with email. Output can follow after the first reply.