-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to resize an existing partition #924
Comments
I believe you need to specify |
Sure, but I don't want to do that. :) I want Ignition to resize the existing partition on which the root filesystem lives. |
I think that we would want a new schema entry for "grow"? |
Why not? Resizing a partition is exactly deleting it + recreating it. Alternatively, for the special case of the root FS, you can just create the |
Technically yes, but only if it's recreated at the same starting offset. If there's a hole before the partition you're looking to resize, This isn't an issue of course with the rootfs on FCOS since the partitions are tightly packed. But in the more general case, we should have some way to allow users to do a pure resize (i.e. keep the starting offset at the same place). |
@jlebon Yeah, I think you're right. That also lets users avoid respecifying any other relevant properties of the partition, such as the type GUID. |
After some discussion with @arithx and @bgilbert, I'm jotting down an approach here so that other folks can provide some feedback:
|
I think in order to test this sanely we need to use a fcct which also e.g. provisions a |
Or, another more complicated idea: Change the code in fedora-coreos-config to detect resizing the root partition in the same way we detect reprovisioning the root filesystem: https://github.com/coreos/fedora-coreos-config/blob/f974aff12fcea21724dda20ce32df0cea93e44b9/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-dracut-rootfs.sh#L14 and if so, then we turn off growpart. |
Or perhaps we should move the "fallback/default growpart" into Ignition; I think I was arguing that at one point somewhere. Anyways short term let's just add a var partition for testing. |
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Right now, there's special logic in coreos-growpart so that we skip `growpart` if the rootfs backing block device or size changed during rootfs reprovisioning (e.g. if one simply changed from xfs to ext4). Let's make that logic more generic so that it's not actually tied to rootfs reprovisioning. That way, if a user changes the partition size via Ignition (pending coreos/ignition#924), we know not to automatically `growpart`.
Yeah, I think that makes sense. This is actually trivially easy to do because we already have that logic in coreos-growpart. But it's just that it's gated behind rootfs reprovisioning. Opened coreos/fedora-coreos-config#604. |
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
Fixes coreos#924 This fix will allow users to resize an existing partition without wiping out an entry from the partition table.
I'm trying to write an fcct to resize the root partition to e.g. 5G and leave the rest unassigned (let's forget about
coreos-growpart.service
for now). Here's what I'm using:This gives me an error:
This is needed so that we can grow the rootfs a bit more before trapping it behind e.g. a
/var
partition. See thread starting at coreos/coreos-assembler#924 (comment).The text was updated successfully, but these errors were encountered: