Poking around, was going to add a 'filesystem' command to hbck2. It would take nothing or a list of one or more table names and optionally a path to a region. If nothing passed, it would review the fs for corrupt hfiles and bad links reporting the bad as it went. If --fix is passed, it will sideline corrupt files and mis-links. Would advise reopen/rolling-restart if change made. For starters would make use of the hbck1 fs tools added by
Above would exploit the following facillty from hbck1.
This would address the following from parent issue at least:
- Fix hfile link problems...
- Enumerate store files to determine file level corruption...
I noticed that the 'read-only' hbck1 tool HBaseFsck which is present in the hbase2 codebase actually allows fixes in the filesystem; i.e. you'd run HBaseFsck and pass say -fixVersionFile. This is mixed in w/ all the other hbck1 noise but an operator should be able to make progress with what is there regards hfile corruption, bad links, etc. In other words, could just doc this facility in the hbck2 tool point folks to the latent hbck1 HBaseFsck if they need to do fixup of the fs (Would be confusing but it exists).