private DiskStore findExisting(String name) {
    DiskStore existing;
    if (cache instanceof GemFireCacheImpl) {
      existing = cache.findDiskStore(name);
      if (existing != null) {
        if (((DiskStoreImpl) existing).sameAs(attrs)) {
          return existing;
        } else {
          throw new IllegalStateException("DiskStore named \"" + name + "\" already exists");
        }
      }
    }
    return null;
  }
Protected for testing purposes. If during the initial recovery for the disk store, an uncaught
exception is thrown, the disk store will not be in a valid state. In this case, we want to
ensure the resources of the disk store are cleaned up.
geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreFactoryImpl.java