Optimizing disk usage and detecting disk failure