-
Notifications
You must be signed in to change notification settings - Fork 532
Container Linux: Document adding data partition after expanded root filesystem #1125
Comments
I have come up with something like this:
But this configuration is not working. The bootup fails with something like:
From the config I posted above, I have a server with two 3TB disks. The first disk should contain the Container Linux with the ROOT partition (about 80GiB in this case) but also a separate "empty" partition with the rest of the space allocated to it. Second disk is used completely for in this case a storage application. |
Our images have partitions aligned to 2 MB boundaries (see coreos/scripts@7ba6381) but Ignition aligns partitions to 1 MB, so the recreated partitions have different offsets than the existing ones. In addition, there's no guarantee that that the partition offsets and sizes in our images will never change, so it's probably not a good idea to hardcode the current layout into your config. You can achieve the same effect by setting storage:
disks:
- device: "/dev/sda"
partitions:
- label: "data1"
number: 10
start: "85GiB" Container Linux automatically resizes the root filesystem to fill available space, so the above config produces an 82.7 GiB rootfs. We should probably document that trick explicitly. |
Thanks for the info! |
@bgilbert The method you described above didn't work for me. I tried it using Vagrant with Xenial to install a CoreOS system, but it failed when booting into CoreOS and dropped me to an emergency shell. Hard to understand what's going on because the log on the console is quite cluttered, but the |
@DrMurx You're hitting coreos/bugs#2106. If your config doesn't include a |
@bgilbert Thanks for "connecting the dots" between these 3 bugs. In the meantime I came a solution which fits my needs and added it to coreos/bugs#1996 |
I seem to have the same problem even though I think that I followed all the hints in the ticket. I installed CoreOS stable 1353.7.0. Is there anything else that I should do to get a root filesystem on btrfs and a swap partition? (I have a 20 GiB disk and want just a small swap partition.) The reboot after the install fails with "Failed to start initrd-switch-root.target: Transaction is destructive". I ran the install again and saw that ignition doesn't like "start": "19GiB". My ignition.json contains (full file is attached):
|
@stuart12 In that screenshot, you'll need to scroll up to see the Ignition failure. Container Linux Configs allow specifying units for the partition |
To allow for adding custom partitions to the system disk it would be good to have the default disk/partition layout as an Container Linux Config and Ignition Config as an extendable example on the https://github.com/coreos/docs/blob/master/os/sdk-disk-partitions.md page.
Currently I can't just add a new partition to the system disk without having written down all default partitions.
The text was updated successfully, but these errors were encountered: