Description of problem: growpart doesn't work on the F25 cloud base images. I believe this is because of a change in behavior or a bug in sfdisk within util-linux, but I can't be sure which. ========================== [root@cloudhost ~]# fdisk -l /dev/sda1 Disk /dev/sda1: 3 GiB, 3220176896 bytes, 6289408 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes [root@cloudhost ~]# [root@cloudhost ~]# growpart --verbose /dev/sda 1 update-partition set to true found MBR partition table (id = 83) total number of sectors of /dev/sda is 20971520 ## sfdisk --dump /dev/sda label: dos label-id: 0x1ef30347 device: /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 6289408, type=83, bootable max_end=20971520 tot=20971520 pt_end=6291456 pt_start=2048 pt_size=6289408 attempt to resize /dev/sda failed. sfdisk output below: | Backup files: | MBR (offset 0, size 512): /tmp/growpart.VfcA8V/backup-sda-0x00000000.bak | | Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors | Units: sectors of 1 * 512 = 512 bytes | Sector size (logical/physical): 512 bytes / 512 bytes | I/O size (minimum/optimal): 512 bytes / 512 bytes | Disklabel type: dos | Disk identifier: 0x1ef30347 | | Old situation: | | Device Boot Start End Sectors Size Id Type | /dev/sda1 * 2048 6291455 6289408 3G 83 Linux | | >>> Script header accepted. | >>> Script header accepted. | >>> Script header accepted. | >>> Script header accepted. | >>> Created a new DOS disklabel with disk identifier 0x1ef30347. | Created a new partition 1 of type 'Linux' and of size 10 GiB. | /dev/sda2: | New situation: | | Device Boot Start End Sectors Size Id Type | /dev/sda1 * 2048 20971519 20969472 10G 83 Linux | | The partition table has been altered. | Calling ioctl() to re-read partition table. | Re-reading the partition table failed.: Device or resource busy | The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8). FAILED: failed to resize ***** WARNING: Resize failed, attempting to revert ****** 512+0 records in 512+0 records out 512 bytes copied, 0.000652953 s, 784 kB/s ***** Appears to have gone OK **** [root@cloudhost ~]# [root@cloudhost ~]# echo $? 2 [root@cloudhost ~]# [root@cloudhost ~]# fdisk -l /dev/sda1 Disk /dev/sda1: 3 GiB, 3220176896 bytes, 6289408 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes =========================== If I revert to the F24 stack of util-linux then growpart works fine: ========================== [root@cloudhost ~]# dnf downgrade http://mirror.math.princeton.edu/pub/fedora/linux/releases/24/Everything/x86_64/os/Packages/u/util-linux-2.28-2.fc24.x86_64.rpm http://mirror.math.princeton.edu/pub/fedora/linux/releases/24/Everything/x 86_64/os/Packages/l/libblkid-2.28-2.fc24.x86_64.rpm http://mirror.math.princeton.edu/pub/fedora/linux/releases/24/Everything/x86_64/os/Packages/l/libfdisk-2.28-2.fc24.x86_64.rpm http://mirror.math.princeton.edu/pub/fedora/linux/releases /24/Everything/x86_64/os/Packages/l/libmount-2.28-2.fc24.x86_64.rpm http://mirror.math.princeton.edu/pub/fedora/linux/releases/24/Everything/x86_64/os/Packages/l/libuuid-2.28-2.fc24.x86_64.rpm http://mirror.math.princeton.edu/pub/fedora /linux/releases/24/Everything/x86_64/os/Packages/l/libsmartcols-2.28-2.fc24.x86_64.rpm [root@cloudhost ~]# rpm -qa --last | head -n 6 util-linux-2.28-2.fc24.x86_64 Sun 11 Sep 2016 04:04:22 AM UTC libuuid-2.28-2.fc24.x86_64 Sun 11 Sep 2016 04:04:21 AM UTC libsmartcols-2.28-2.fc24.x86_64 Sun 11 Sep 2016 04:04:21 AM UTC libmount-2.28-2.fc24.x86_64 Sun 11 Sep 2016 04:04:21 AM UTC libfdisk-2.28-2.fc24.x86_64 Sun 11 Sep 2016 04:04:21 AM UTC libblkid-2.28-2.fc24.x86_64 Sun 11 Sep 2016 04:04:21 AM UTC [root@cloudhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 10G 0 disk sdc 8:32 0 366K 0 disk sda 8:0 0 10G 0 disk └─sda1 8:1 0 3G 0 part / [root@cloudhost ~]# [root@cloudhost ~]# fdisk -l /dev/sda Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1ef30347 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 6291455 6289408 3G 83 Linux [root@cloudhost ~]# [root@cloudhost ~]# growpart --verbose /dev/sda 1 update-partition set to true found MBR partition table (id = 83) total number of sectors of /dev/sda is 20971520 ## sfdisk --dump /dev/sda label: dos label-id: 0x1ef30347 device: /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 6289408, type=83, bootable max_end=20971520 tot=20971520 pt_end=6291456 pt_start=2048 pt_size=6289408 CHANGED: partition=1 start=2048 old: size=6289408 end=6291456 new: size=20969472,end=20971520 [root@cloudhost ~]# [root@cloudhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 10G 0 disk sdc 8:32 0 366K 0 disk sda 8:0 0 10G 0 disk └─sda1 8:1 0 10G 0 part / [root@cloudhost ~]# [root@cloudhost ~]# fdisk -l Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1ef30347 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 20971519 20969472 10G 83 Linux ============================ Version-Release number of selected component (if applicable): From https://kojipkgs.fedoraproject.org//work/tasks/5352/15555352/Fedora-Cloud-Base-25-20160909.n.0.x86_64.qcow2 [root@cloudhost ~]# rpm -q cloud-utils-growpart util-linux cloud-utils-growpart-0.27-16.fc25.noarch util-linux-2.28.1-1.fc25.x86_64 How reproducible: Always Steps to Reproduce: 1. boot up https://kojipkgs.fedoraproject.org//work/tasks/5352/15555352/Fedora-Cloud-Base-25-20160909.n.0.x86_64.qcow2 with a disk around 10G. 2. growpart will fail - see journalctl for output 3. run growpart /dev/sda 1 manually to see issue first hand
looks like upgrading to the latest version in updates-testing might have fixed the issue: ========================== [root@cloudhost ~]# rpm -q cloud-utils-growpart util-linux cloud-utils-growpart-0.27-16.fc25.noarch util-linux-2.28.2-1.fc25.x86_64 [root@cloudhost ~]# growpart /dev/sda 1 CHANGED: partition=1 start=2048 old: size=6289408 end=6291456 new: size=20969472,end=20971520 ========================== and actually i found this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1371761 This is a dup of 1371761
*** This bug has been marked as a duplicate of bug 1371761 ***