bottlerocket
bottlerocket copied to clipboard
Blockdevice mapping for data partiton
What I'd like: I would like to use ephemeral instance store as a data parition.
In the AMI block device mapping it looks like bottlerocket has a root and a data volume.
I have not found any documentation how big each volume should be and what is the minimum size.
Will the data volume formated automatically and used? In this case a simple block device mapping like this would be enough:
blockDeviceMappings:
- deviceName: /dev/xvda
ebs:
deleteOnTermination: true
encrypted: true
volumeSize: 10Gi
volumeType: gp3
- deviceName: /dev/xvdb
virtualName: "ephemeral0"
Any alternatives you've considered:
I know that there are discussion like this: https://github.com/bottlerocket-os/bottlerocket/discussions/1991#discussioncomment-3265188
Due to the issues mentioned there I thought it might be even easier to just mount the whole volume instead of running these custom bootstrap containers.
@runningman84 Thanks for raising this issue. We will look in to this and get back to you.
Btw. I could also live with a working setup-runtime-storage script which doesn't work anymore in recent bottlerocket releases.
Hi @runningman84, the data volume is where the data partition resides and Bottlerocket grows the data partition to fill the full size of the volume upon boot. The data partition is where all local data goes, e.g. pulled container images, ephemeral volumes, etc. You can read more about Bottlerocket's default volumes here: https://github.com/bottlerocket-os/bottlerocket#default-volumes
We recommend a default size of 20GB, but users are free to adjust the size to their liking.
As for mounting instance ephemeral storage, we'll have look into why the script is no longer working anymore.
@runningman84, when you say as a data partition, do you mean the data partition for Bottlerocket to store the container images? Or a data partition used by your containers?
I speak about the data volume which seems to be partioned and stored images and container data…