private AsyncInvocation<Void> createPersistentRegionAsync(final VM memberVM, boolean useKrf,
      boolean expireTombstones) {
    return memberVM.invokeAsync("createPersistentRegionAsync", () -> {
      if (!useKrf) {
        System.setProperty(DiskStoreImpl.RECOVER_VALUES_SYNC_PROPERTY_NAME, "true");
      }
      if (expireTombstones) {
        DiskStoreImpl.SET_IGNORE_PREALLOCATE = true;
        TombstoneService.REPLICATE_TOMBSTONE_TIMEOUT = 1;
        TombstoneService.EXPIRED_TOMBSTONE_LIMIT = 1;
      }
      File dir = new File(diskDir, String.valueOf(ProcessUtils.identifyPid()));

      Cache cache = managementTestRule.getCache();

      DiskStoreFactory diskStoreFactory = cache.createDiskStoreFactory();
      diskStoreFactory.setDiskDirs(new File[] {dir});
      diskStoreFactory.setMaxOplogSize(1);
      diskStoreFactory.setAllowForceCompaction(true);
      diskStoreFactory.setAutoCompact(false);
      DiskStore diskStore = diskStoreFactory.create(REGION_NAME);

      RegionFactory regionFactory = cache.createRegionFactory();
      regionFactory.setDiskStoreName(diskStore.getName());
      regionFactory.setDiskSynchronous(true);
      regionFactory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
      regionFactory.setScope(Scope.DISTRIBUTED_ACK);
      regionFactory.create(REGION_NAME);
    });
  }
Compact a disk store from managerVM VM
geode-core/src/distributedTest/java/org/apache/geode/management/DiskManagementDUnitTest.java