GNU bug report logs - #42796
partprobe doesn't reload partition information for loop devices when invoked with no options

Previous Next

Package: parted;

Reported by: "Szuberski, Damian (Nokia - HU/Budapest)" <damian.szuberski <at> nokia.com>

Date: Mon, 10 Aug 2020 10:14:02 UTC

Severity: normal

Done: "Brian C. Lane" <bcl <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42796 in the body.
You can then email your comments to 42796 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#42796; Package parted. (Mon, 10 Aug 2020 10:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Szuberski, Damian (Nokia - HU/Budapest)" <damian.szuberski <at> nokia.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Mon, 10 Aug 2020 10:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Szuberski, Damian (Nokia - HU/Budapest)" <damian.szuberski <at> nokia.com>
To: "bug-parted <at> gnu.org" <bug-parted <at> gnu.org>
Subject: partprobe doesn't reload partition information for loop devices when
 invoked with no options
Date: Mon, 10 Aug 2020 08:27:07 +0000
Hello parted developers!

I hope you're well. Steps to reproduce the bug I just found

# script start
(zpool destroy rootPool1 ; losetup -D ; rm -rf disk* ) &> /dev/null

set -xe

uname -a
partprobe --version
zpool --version

fallocate -l 3G disk1
sgdisk -Z -n1:1M:+1023M -t1:8300 disk1 &> /dev/null
losetup -Pf disk1

lsblk /dev/loop0
sgdisk -p /dev/loop0

zpool create -R /mnt rootPool1 /dev/loop0p1

sgdisk -d1 -n1:1M:+2G -t1:8300 /dev/loop0 &> /dev/null
echo "CORRECT REPORT HERE (2G)"
sgdisk -p /dev/loop0
partprobe

echo "INCORRECT REPORT HERE (1G)"
lsblk /dev/loop0

echo "CORRECT REPORT HERE (2G)"
partprobe /dev/loop0
lsblk /dev/loop0
# script end

# output begin
+ uname -a
Linux damian 5.7.0-2-cloud-amd64 #1 SMP Debian 5.7.10-1 (2020-07-26) x86_64 GNU/Linux
+ partprobe --version
partprobe (GNU parted) 3.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.
+ zpool --version
zfs-0.8.4-2
zfs-kmod-0.8.4-2
+ fallocate -l 3G disk1
+ sgdisk -Z -n1:1M:+1023M -t1:8300 disk1
+ losetup -Pf disk1
+ lsblk /dev/loop0
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0       7:0    0    3G  0 loop
└─loop0p1 259:0    0 1023M  0 part
+ sgdisk -p /dev/loop0
Disk /dev/loop0: 6291456 sectors, 3.0 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 190FB977-371C-4C2C-A180-EB55E188B8E2
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 6291422
Partitions will be aligned on 2048-sector boundaries
Total free space is 4196285 sectors (2.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         2097151   1023.0 MiB  8300
+ zpool create -R /mnt rootPool1 /dev/loop0p1
+ sgdisk -d1 -n1:1M:+2G -t1:8300 /dev/loop0
+ echo 'CORRECT REPORT HERE (2G)'
CORRECT REPORT HERE (2G)
+ sgdisk -p /dev/loop0
Disk /dev/loop0: 6291456 sectors, 3.0 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 190FB977-371C-4C2C-A180-EB55E188B8E2
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 6291422
Partitions will be aligned on 2048-sector boundaries
Total free space is 2097085 sectors (1024.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         4196351   2.0 GiB     8300
+ partprobe
+ echo 'INCORRECT REPORT HERE (1G)'
INCORRECT REPORT HERE (1G)
+ lsblk /dev/loop0
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0       7:0    0    3G  0 loop
└─loop0p1 259:0    0 1023M  0 part
+ echo 'CORRECT REPORT HERE (2G)'
CORRECT REPORT HERE (2G)
+ partprobe /dev/loop0
+ lsblk /dev/loop0
NAME      MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0       7:0    0   3G  0 loop
└─loop0p1 259:0    0   2G  0 part
# output end

-- 
Damian Szuberski




Reply sent to "Brian C. Lane" <bcl <at> redhat.com>:
You have taken responsibility. (Tue, 11 Aug 2020 17:06:02 GMT) Full text and rfc822 format available.

Notification sent to "Szuberski, Damian (Nokia - HU/Budapest)" <damian.szuberski <at> nokia.com>:
bug acknowledged by developer. (Tue, 11 Aug 2020 17:06:02 GMT) Full text and rfc822 format available.

Message #10 received at 42796-close <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: "Szuberski, Damian (Nokia - HU/Budapest)" <damian.szuberski <at> nokia.com>
Cc: 42796-close <at> debbugs.gnu.org
Subject: Re: bug#42796: partprobe doesn't reload partition information for
 loop devices when invoked with no options
Date: Tue, 11 Aug 2020 10:02:47 -0700
On Mon, Aug 10, 2020 at 08:27:07AM +0000, Szuberski, Damian (Nokia - HU/Budapest) wrote:
> Hello parted developers!
> 
> I hope you're well. Steps to reproduce the bug I just found

partprobe doesn't include loop devices unless you specify them on the
cmdline.

It looks to me like sgpart or debian does have a problem though, they
should be notifying the kernel of the change when you resize the
partition. If I do the same steps on Fedora, using sgdisk or parted I
don't need to run partprobe for lsblk to show the updated size.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Sep 2020 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.