It used to be very unlikely that the directory scanner encountered two replicas of the same block on different volumes.
With memory storage, it is very likely to hit this with the following sequence of events:
- Block is written to RAM disk
- Lazy writer saves a copy on persistent volume
- DN attempts to evict the original replica from RAM disk, file deletion fails as the replica is in use.
- Directory scanner finds a replica on both RAM disk and persistent storage.
The directory scanner should never delete the block on persistent storage.