So you’re minding your own business, when out of nowhere you get a text from your Synology NAS has experienced a drive failure. Your heart skips a beat but you remember that the drive is still under warranty, and you silently pat yourself on the back for having the foresight to implement the notification service, and for setting up dual-disk redundancy RAID so that even if a second drive were to fail, you could still recover all your data.
You submit the hard drive warranty claim (making sure to choose the “advanced replacement” option where they send you the new drive before you return the defective one) and pretty soon you have the brand new replacement drive to install.
Out comes the old drive, in goes the new, and you tell the Synology to repair the degraded RAID array. Before long, the Storage Manager shows you an indicator that slowly crawls up from 0.0%.
A percentage indicator is great! But it doesn’t mean much without context. It would be nice for the RAID rebuild progress indicator to give you an ETA, so you can start breathing again.
Oddly enough, the system is already estimating how long it will take, but for some reason the number is hidden, and of course is only revealed by a command line session through SSH.
Unlike some other command line tricks for Synology NAS devices, this one does not require logging in as root, however it does require a user who actually has SSH access, in other words an admin user. Once you’re logged in it’s quite simple.
[code lang=”bash”]cat /proc/mdstat[/code]
It will then output something like this:
Yours may not look the same depending on how you structured your drives. Each volume is identified by an MD (Multiple Device) which is just a linux term meaning it can be an aggregate of many drives. You may see more MD designations rebuilding simultaneously. In this case MD2 is rebuilding, and shows that it will finish in just over 980 minutes — roughly 16 hours. So you can go for a walk. Or stream some videos because your Synology can rebuild itself without interrupting its other duties.