private synchronized void createDefaultVolumes() {
        LOGGER.debug("createDefaultVolumes called, createDefaultVolumes: {}", createdDefaultVolumes);

        // (re-)check state now we hold synch lock
        if (!createdDefaultVolumes) {
            try {
                securityContext.insecure(() -> {
                    final FsVolumeConfig volumeConfig = volumeConfigProvider.get();
                    final boolean isEnabled = volumeConfig.isCreateDefaultStreamVolumesOnStart();
                    if (isEnabled) {
                        final FindFsVolumeCriteria findVolumeCriteria = FindFsVolumeCriteria.matchAll();
                        findVolumeCriteria.addSort(FindFsVolumeCriteria.FIELD_ID, false, false);
                        final List<FsVolume> existingVolumes = doFind(findVolumeCriteria).getValues();
                        if (existingVolumes.isEmpty()) {
                            if (volumeConfig.getDefaultStreamVolumePaths() != null) {
                                final List<String> paths = volumeConfig.getDefaultStreamVolumePaths();
                                for (String path : paths) {
                                    final Path resolvedPath = pathCreator.toAppPath(path);
                                    LOGGER.info("Creating default data volume with path {}",
                                            resolvedPath.toAbsolutePath().normalize());

                                    createVolume(resolvedPath);
                                }

                            } else {
                                LOGGER.warn(() -> "No suitable directory to create default volumes in");
                            }
                        } else {
                            LOGGER.info(() -> "Existing volumes exist, won't create default volumes");
                        }
                    } else {
                        LOGGER.info(() -> "Creation of default volumes is currently disabled");
                    }
                });
            } catch (final RuntimeException e) {
                LOGGER.error(e::getMessage, e);
            } finally {
                createdDefaultVolumes = true;
                LOGGER.debug("createdDefaultVolumes set to true");
            }
        } else {
            LOGGER.debug("Volumes already created");
        }
    }
Public for use in tests that tear down volumes
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/FsVolumeService.java