private void writePRCreate(String name, PRPersistentConfig config) {
    int nameLength = estimateByteSize(name);
    String colocatedWith = config.getColocatedWith();
    colocatedWith = colocatedWith == null ? "" : colocatedWith;
    int colocatedLength = estimateByteSize(colocatedWith);
    try (HeapDataOutputStream hdos =
        new HeapDataOutputStream(1 + nameLength + 4 + colocatedLength + 1, KnownVersion.CURRENT)) {
      hdos.write(IFREC_PR_CREATE);
      hdos.writeUTF(name);
      hdos.writeInt(config.getTotalNumBuckets());
      hdos.writeUTF(colocatedWith);
      hdos.write(END_OF_RECORD_ID);
      writeIFRecord(hdos, false);
    } catch (IOException ex) {
      DiskAccessException dae = new DiskAccessException(
          String.format("Failed writing data to initialization file because: %s", ex),
          parent);
      if (!compactInProgress) {
        parent.handleDiskAccessException(dae);
      }
      throw dae;
    }
  }
Write all live data to the init file
geode-core/src/main/java/org/apache/geode/internal/cache/DiskInitFile.java