The tables, directories and other structures required for drive storage systems are complex, and prone to error, and sometimes corruption. Establishing that a problem is not the result of such issues is often an important first step. With El Capitan, it has also become something of a complex step, depending on which drive you want to check, and the storage medium.
All drive storage has at least two levels at which checks and repairs may be necessary: the whole-drive level, containing vital things like the partition map, and each volume’s file system, which is normally Mac Extended (HFS+). Although you can check a live mounted volume, if it requires repair it will have to be unmounted, so in general if you think there might be problems which need repair, you should go straight to repair – which requires the volume to be unmounted.
The startup volume cannot be repaired on two counts now: first, it cannot be unmounted, and second, as a live startup volume SIP prevents such repair. Whatever type of storage – hard disk, SSD, or Fusion Drive – the only way to repair your startup volume is to restart into Recovery Mode (Command-R) and run Disk Utility from there. If you prefer to run a third-party repair utility, that is best performed by restarting from a suitably-prepared bootable USB memory stick, containing OS X, Disk Utility, and the third-party tool. Vendors of those products explain how to prepare such a stick, and will usually provide a stick ready prepared.
Other internal or directly-connected external (USB, Thunderbolt, etc.) drives should be able to have their volumes unmounted. For those, you can run Disk Utility or a third-party tool as you wish.
However, if an external drive is a hardware RAID system, before running any disk and volume checks and repairs, you should ensure that the RAID system itself is fully healthy. This should be supported by the software which controls the RAID system, and detailed in its documentation. Once that is complete, use Disk Utility and/or the third-party tool as you wish.
There are also complications with CoreStorage LVGs, if you use them. This could apply to your startup disk, if you have an Apple Fusion Drive, or have made your own equivalent. Although Disk Utility can check and repair CoreStorage LVGs like Fusion Drives, third-party products may not be able to: check their documentation carefully before trying to use them.
Networked storage, including Apple Time Capsules and third-party NAS, are not accessible to Disk Utility, nor to its third-party replacements. Each therefore has its own utility software or web browser interface which gives you access to the disk checking and repair tools available. In the case of Time Capsules, use Apple’s AirPort Utility, as detailed here.
It is very unusual for a NAS to offer as sophisticated and powerful tools for checking and repair of its drive(s) as are available in OS X. This should be a significant consideration in selecting storage systems, and choosing your NAS.
Note that, like hardware RAID systems, there is an additional level in networked storage systems, which actually runs the NAS and makes it accessible over your network. Testing and fixing that is a much harder task, and seldom supported. Normally your only option is to update the system’s firmware/software.
USB and other drives which are connected to Time Capsules and other NAS systems are usually not accessible through those utilities. Shut the drive down, disconnect it from the NAS, and connect it direct to your Mac. You can then check and repair it using Disk Utility and/or third-party tools. Once happy, eject it, turn it off, and re-attach it to the NAS.
Remote storage, in particular cloud storage such as iCloud, is maintained by its service provider. There is nothing that you can do to test or repair it. If you feel that there is a problem, contact the service provider’s support desk.
Throughout this article, where I have referred to using Disk Utility, you may also be able to use its command line equivalent,
diskutil, which is considerably more powerful, but far more complex to use.