What is happening
The q setting determines shard ranges and n determines replica copies. Moving or replacing shards requires coordinated file transfer and matching _dbs changelog, by_node, and by_range entries. CouchDB warns that inconsistent placement metadata can irreparably corrupt the cluster, so recovery should compare revision trees before any replica is declared authoritative.