浏览代码

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.
Marek Marczykowski-Górecki 4 年之前
父节点
当前提交
2dbdb1e66f
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      misc/resize-rootfs
  2. 1 1
      patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch

+ 1 - 1
misc/resize-rootfs

@@ -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

+ 1 - 1
patches.debian/0001-Revert-Use-sfdisk-instead-of-parted-to-resize-root-p.patch

@@ -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