bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

Blockdevice mapping for data partiton

Open runningman84 opened this issue 1 year ago • 5 comments

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 avatar Nov 27 '23 19:11 runningman84

@runningman84 Thanks for raising this issue. We will look in to this and get back to you.

vyaghras avatar Nov 27 '23 19:11 vyaghras

Btw. I could also live with a working setup-runtime-storage script which doesn't work anymore in recent bottlerocket releases.

runningman84 avatar Nov 28 '23 16:11 runningman84

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.

etungsten avatar Dec 02 '23 01:12 etungsten

@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?

arnaldo2792 avatar Jan 16 '24 20:01 arnaldo2792

I speak about the data volume which seems to be partioned and stored images and container data…

runningman84 avatar Jan 17 '24 05:01 runningman84