boolean addBlobStoreForFileCopy(ReplicaId replica) {
    rwLock.writeLock().lock();
    boolean succeed = false;
    try {
      if (!running) {
        logger.error("Failed to add {} because disk manager is not running", replica.getPartitionId());
      } else {
        // Directory is already created in prefilecopy steps. So no directory cleanup required.
        BlobStore store = new BlobStore(replica, storeConfig, scheduler, longLivedTaskScheduler, this, diskIOScheduler,
            diskSpaceAllocator, storeMainMetrics, storeUnderCompactionMetrics, keyFactory, recovery, hardDelete,
            replicaStatusDelegates, time, accountService, null, indexPersistScheduler);
        store.start();
        // add store into CompactionManager
        compactionManager.addBlobStore(store);
        // add new created store into in-memory data structures.
        stores.put(replica.getPartitionId(), store);
        // create a bootstrap-in-progress file to distinguish it from regular stores (the file will be checked during
        // BOOTSTRAP -> STANDBY transition)
        createBootstrapFileIfAbsent(replica);
        logger.info("New store for partitionId {} is successfully added into DiskManager.", replica.getPartitionId());
        succeed = true;
      }
    } catch (Exception e) {
      logger.error("Failed to start new added store for partitionId {} for FileCopy based replication", replica.getPartitionId(),
          e);
    } finally {
      rwLock.writeLock().unlock();
    }
    return succeed;
  }
Add a new BlobStore with given {@link ReplicaId}.
@param replica the {@link ReplicaId} of the {@link Store} which would be added.
@return {@code true} if adding store was successful. {@code false} if not.
ambry-store/src/main/java/com/github/ambry/store/DiskManager.java