Skip to content

Commit

Permalink
squash 14 commits: (#60)
Browse files Browse the repository at this point in the history
add spaces for style

filesystem is a word

don't touch logical volumes

support ext[234]

round down requested size, use sectors with sfdisk, fix bad math

prevent globbing and word splitting

changelog

quit if shrink size is zero

PV extents numbered starting at 0

oops, go the other way!

move left, not right!

get pedantic about bigboot_size

calculate new pv size based on partition size

lsblk output pipe tail not reliable
  • Loading branch information
swapdisk committed Mar 7, 2024
1 parent 03add12 commit b1c97f3
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 180 deletions.
5 changes: 5 additions & 0 deletions changelogs/fragments/fix_maths.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bugfixes:
- Round down requested size to multiple of extent size
- Use sectors with sfdisk
- Clean up bad math in bigboot.sh

9 changes: 5 additions & 4 deletions roles/bigboot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ Finally, there is a copy of the [`sfdisk`](https://man7.org/linux/man-pages/man8

## Role Variables

### `bigboot_size`
### `bigboot_size` (String)

The variable `bigboot_size` sets the target size of the boot partition after the role has completed.
The value can be either in bytes or with optional single letter suffix (1024 bases).
See `Unit options` type `iec` of [`numfmt`](https://man7.org/linux/man-pages/man1/numfmt.1.html)
The variable `bigboot_size` specifies by how much the size of the boot partition should be increased. The value can be either in bytes or with optional single letter suffix (1024 bases). See unit options type `iec` of [`numfmt`](https://man7.org/linux/man-pages/man1/numfmt.1.html).

> **Note**
>
> The effective `bigboot_size` may be slightly less than the specified value as the role will round down to the nearest multiple of the extent size of the LVM physical volume in the partition above the boot partition.
## Example of a playbook to run the role
The following yaml is an example of a playbook that runs the role against a group of hosts named `rhel` and increasing the size of its boot partition by 1G.
Expand Down

0 comments on commit b1c97f3

Please sign in to comment.