Improve snapshot storage system for easy bisection. Fix #2694. Fix #2851.