From e58c4b0c9c883b8cf026859c3c8c53744a221985 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 7 Aug 2022 08:56:26 -0400 Subject: [PATCH] iiab-expand-rootfs: Note collision (race condition) w/ fsck --- roles/1-prep/templates/iiab-expand-rootfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/1-prep/templates/iiab-expand-rootfs b/roles/1-prep/templates/iiab-expand-rootfs index bc81bd302..2cd28de46 100644 --- a/roles/1-prep/templates/iiab-expand-rootfs +++ b/roles/1-prep/templates/iiab-expand-rootfs @@ -14,8 +14,8 @@ if [ -f /.expand-rootfs ] || [ -f /.resize-rootfs ]; then if [ -x /usr/bin/raspi-config ]; then # Raspberry Pi OS # 2022-02-17: Uses do_expand_rootfs() from: # https://github.com/RPi-Distro/raspi-config/blob/master/raspi-config - raspi-config --expand-rootfs - else # Other Linux OS's + raspi-config --expand-rootfs # REQUIRES A REBOOT + else # REQUIRES NO REBOOT; BEWARE iiab-expand-rootfs.service RACE CONDITION WITH fsck (PR #2522 & #3325) # 2022-03-15: Borrows from above raspi-config URL's do_expand_rootfs() ROOT_PART="$(findmnt / -o SOURCE -n)" # e.g. /dev/sda2 or /dev/mmcblk0p2 ROOT_DEV="/dev/$(lsblk -no pkname "$ROOT_PART")" # e.g. /dev/sda or /dev/mmcblk0