Autoformatting & state storage in AWS

Hi there. I’m trying to use RancherOS 0.4.2 in AWS with state storage separate from the root storage (EBS) volume. I’ve added a second EBS volume when creating the instance and have the following cloud config set, but it doesn’t seem to be doing anything & I can’t see and log messages to indicate why. Any ideas?

#cloud-config
rancher:
  state:
    fstype: auto
    dev: LABEL=STATE
    formatzero: true
    autoformat:
      - /dev/xvdb

Any ideas anyone? @denise?

The best I can tell is that autoformat is only for when the state partition is not formatted:“If the state partition is already found, RancherOS will not try to auto format a partition” (http://docs.rancher.com/os/cloud-config/)

I have also been having issues mounting a partition that is already formatted with the mounts configuration.

I think there are two problems that prevented this from working properly.

  1. Mounting state happens before the AWS userdata (cloud-config) is fetched.
  2. The device you specify is LABEL=STATE. Unless the EBS volume has this label, it’s not going to be found.

If there’s a way to specify kernel parameters in AWS, then you could set the state device there and it’ll be read before state is mounted.