# Autoformatting & state storage in AWS

**URL:** <https://forums.suse.com/t/autoformatting-state-storage-in-aws/2110>\
**Category:** RancherOS\
**Created:** [March 21, 2016, 12:13pm UTC](https://forums.suse.com/t/autoformatting-state-storage-in-aws/2110 "2016-03-21T12:13:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stuart](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/stuart/32/1084_2.png) [@stuart](https://forums.suse.com/u/stuart)\
**Post date:** [March 21, 2016, 12:13pm UTC](https://forums.suse.com/t/autoformatting-state-storage-in-aws/2110/1 "2016-03-21T12:13:27Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![stuart](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/stuart/32/1084_2.png) [@stuart](https://forums.suse.com/u/stuart)\
**Post date:** [March 28, 2016, 3:15pm UTC](https://forums.suse.com/t/autoformatting-state-storage-in-aws/2110/2 "2016-03-28T15:15:35Z")

</div>

Any ideas anyone? @denise?

---

<div class="post-metadata">

**Author:** ![kmcgrath](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kmcgrath/32/446_2.png) [@kmcgrath](https://forums.suse.com/u/kmcgrath)\
**Post date:** [July 26, 2016, 8:52pm UTC](https://forums.suse.com/t/autoformatting-state-storage-in-aws/2110/3 "2016-07-26T20:52:02Z")

</div>

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/](http://docs.rancher.com/os/cloud-config/))

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

---

<div class="post-metadata">

**Author:** ![joshwget](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/joshwget/32/704_2.png) [@joshwget](https://forums.suse.com/u/joshwget)\
**Post date:** [August 3, 2016, 10:15pm UTC](https://forums.suse.com/t/autoformatting-state-storage-in-aws/2110/4 "2016-08-03T22:15:35Z")

</div>

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.
