Fix misleading error message on rootfs resize

The partition being extended is in use and sfdisk can't reload such
partition table. Tell it to not even try, it will be done by partprobe
call below.
This commit is contained in:
Marek Marczykowski-Górecki 2019-09-27 16:32:18 +02:00
parent 0c0149f361
commit 2dbdb1e66f
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ case "$(stat -Lc %t:%T /dev/mapper/dmroot)" in
;;
ca:3)
# resize partition table itself and xda3 partition
echo ',+' | sfdisk --no-reread -q -N 3 /dev/xvda
echo ',+' | sfdisk --no-reread --no-tell-kernel -q -N 3 /dev/xvda
# and reload partition table; prefer partprobe over blockdev
# --rereadpt, as it works on mounted partitions
partprobe /dev/xvda

View File

@ -25,7 +25,7 @@ index 1c2fca3c..bebf1011 100755
;;
ca:3)
- # resize partition table itself and xda3 partition
- echo ',+' | sfdisk --no-reread -q -N 3 /dev/xvda
- echo ',+' | sfdisk --no-reread --no-tell-kernel -q -N 3 /dev/xvda
+ # resize partition table itself
+ # use undocumented ---pretend-input-tty (yes, three '-') to
+ # force unattended operation, otherwise it aborts on first