maxInstance
count more than 1, you might encounter problems when Stratos tries to attach the volume to the second instance. Currently persistence volume mapping has been fully tested only in EC2 for Apache Stratos.The persistence volume is an optional configuration that can be specified by the user, if the user wants additional volumes to store content. Add a configuration similar to the following in the cartridge definition.
"persistence": { "isRequired": "true", "volume" : [ { "device": "/dev/sdc", "mappingPath": "/home/ubuntu/sdc", "size": "10", "removeOnTermination": "false" } ] }
Stratos provides the capability to specify multiple persistence volumes in the cartridge definition file as follows, in case you require more than one additional volume.
"persistence": { "isRequired": "true", "volume" : [ { "device": "/dev/sdc", "mappingPath": "/home/ubuntu/sdc", "size": "10", "removeOnTermination": "false" }, { "device": "/dev/sdf", "mappingPath": "/home/ubuntu/sdf", "size": "20", "removeOnTermination": "false" } ] }
You should not specify the same mappingPath
to multiple volumes. If done so, that mappingPath
will be mapped to the volume defined last and it is unpredictable whether the other volumes will be mapped to a directory.
mappingPath.
Follow the instructions below to verify if the volumes have been created:
Execute the command: df -h
You will see an output as follows:
df -h Filesystem Size Used Avail Use% Mounted on /dev/xvdc 10G 7.1G 97G 3% /home/ubuntu/sdc /dev/sda1 4000G 40G 320G 10% /home