code: private void format(StorageDirectory sd) throws IOException {
      sd.clearDirectory(); // create current dir
      sd.write();
      writeTransactionIdFile(sd, -1);
  
      LOG.info("Storage directory " + sd.getRoot()
               + " has been successfully formatted.");
    }
docs: Create new dfs name directory.  Caution: this destroys all files
  in this filesystem.