Named Volume
In SImA named volumes are used, this makes it easier to share data between services.
This is also an advantage, the user doesn't need to configure the system to install the SImA stack. The named volumes are stored and managed by docker daemon itself in the folder: /var/lib/docker/volumes
In SImA the named volume for MinIO was configured as follows:
# before ############################# minio1: ... volumes: - minio1_data : /data1 ... volumes: postgres_data: minio1_data: cluster_fs : |
So we tell docker to create a volume named "minio1_data" and this folder will be mounted into the minio1 container under "/data1". On the host "/data1" will be found in the folder: /var/lib/docker/volumes/SImA_minio1_data
How to remount it
However, in the case of MinIO, the volume will be very large, e.g up to 100 TB and it is not advisable to store it in the /var/lib folder.
It is more appropriate to store the MinIO's volume on a separate disc as a mount point, separated from the host's disc.
For that we can change the configuration in the docker-compose.yml as follows:
# after ############################## minio1: ... volumes: - /data1 : /data1 ... volumes: postgres_data: cluster_fs : |
So we remove the named volume "minio1_data", replace it with a mount point "/data1".
Of course, the mount point "/data1" must be created beforehand. In the following example, we demonstrate mounting an USB plugged in the "/dev/sbd1" to the "/data1"
# check what we have there $ fdisk -l ... Device Boot Start End Sectors Size Id Type /dev/sdb1 240 30719999 30719760 14.7G c W95 FAT32 (LBA) # create folder and mount to it $ mkdir /data1 $ mount /dev/sdb1 /data1 |
That's all. You can start or restart the SImA stack as usual to put this into effect.
Comments
0 comments
Article is closed for comments.