GNU bug report logs -
#21272
partprobe does not wait for refresh of partition info
Previous Next
To reply to this bug, email your comments to 21272 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-parted <at> gnu.org
:
bug#21272
; Package
parted
.
(Sun, 16 Aug 2015 00:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bjoern Eberth <bjoern.eberth <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-parted <at> gnu.org
.
(Sun, 16 Aug 2015 00:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all,
As the web bugtracker seems to be broken I write this mail.
I'm using parted 3.2. All this was tested running a Debian jessie release
within a virtual machine on Windows 8.1 using VMware Workstation 11.
/dev/sdb is an USB cardreader physically connected to the Windows 8.1
machine and looped to the virtual machine.
I was executing a script that does 'partprobe /dev/sdb' and immediatly
after that 'dd of=/dev/sdb1 if=<something>'. The result is, that I get a
regular file /dev/sdb1.
After some more investigation I found, that after executing partprobe the
partition files got removed and readded to the system.
So running the script:
root <at> debian:~# cat /tmp/test
partprobe /dev/sdb
while true; do
ls -lad /dev/sdb1
done
results in:
root <at> debian:~# /tmp/test
brw------- 1 root root 8, 17 Aug 15 16:39 /dev/sdb1
ls: cannot access /dev/sdb1: No such file or directory
ls: cannot access /dev/sdb1: No such file or directory
ls: cannot access /dev/sdb1: No such file or directory
ls: cannot access /dev/sdb1: No such file or directory
ls: cannot access /dev/sdb1: No such file or directory
brw------- 1 root root 8, 17 Aug 15 16:39 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 16:39 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 16:39 /dev/sdb1
[...]
brw-rw---- 1 root disk 8, 17 Aug 15 16:39 /dev/sdb1
brw-rw---- 1 root disk 8, 17 Aug 15 16:39 /dev/sdb1
brw-rw---- 1 root disk 8, 17 Aug 15 16:39 /dev/sdb1^C
All the above is happing in way less then a second after executing
partprobe.
Thats a really odd behaviour.
Then I downgraded parted to version 2.2 and ran the test script again:
root <at> debian:~# /tmp/test
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
brw------- 1 root root 8, 17 Aug 15 14:38 /dev/sdb1
[...]
brw-rw---- 1 root disk 8, 17 Aug 15 16:39 /dev/sdb1
brw-rw---- 1 root disk 8, 17 Aug 15 16:39 /dev/sdb1
brw-rw---- 1 root disk 8, 17 Aug 15 16:39 /dev/sdb1^C
This looks rather fine to me.
Is this a bug? Or is partprobe 3.2 just running much faster than partprobe
2.2 giving the kernel no time to reread the partition table? Or something
else?
Kind regards,
Bjoern
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-parted <at> gnu.org
:
bug#21272
; Package
parted
.
(Mon, 17 Aug 2015 15:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sun, Aug 16, 2015 at 01:22:15AM +0200, Bjoern Eberth wrote:
> Hi all,
>
> As the web bugtracker seems to be broken I write this mail.
>
> I'm using parted 3.2. All this was tested running a Debian jessie release
> within a virtual machine on Windows 8.1 using VMware Workstation 11.
> /dev/sdb is an USB cardreader physically connected to the Windows 8.1
> machine and looped to the virtual machine.
>
> I was executing a script that does 'partprobe /dev/sdb' and immediatly
> after that 'dd of=/dev/sdb1 if=<something>'. The result is, that I get a
> regular file /dev/sdb1.
>
> After some more investigation I found, that after executing partprobe the
> partition files got removed and readded to the system.
> So running the script:
> root <at> debian:~# cat /tmp/test
> partprobe /dev/sdb
> while true; do
> ls -lad /dev/sdb1
> done
udev is responsible for making sure the device nodes are correct. You
can't depend on them being present without checking for them first. A
udevadm settle after partprobe may also help.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
Information forwarded
to
bug-parted <at> gnu.org
:
bug#21272
; Package
parted
.
(Fri, 18 Sep 2015 20:00:05 GMT)
Full text and
rfc822 format available.
Message #11 received at 21272 <at> debbugs.gnu.org (full text, mbox):
On 8/17/2015 11:58 AM, Brian C. Lane wrote:
> udev is responsible for making sure the device nodes are correct. You
> can't depend on them being present without checking for them first. A
> udevadm settle after partprobe may also help.
IIRC, libparted contacts udev to wait for the dev node to be created so
this shouldn't happen. At least if it was configured with udev.
Information forwarded
to
bug-parted <at> gnu.org
:
bug#21272
; Package
parted
.
(Wed, 23 Sep 2015 23:41:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 21272 <at> debbugs.gnu.org (full text, mbox):
On Fri, Sep 18, 2015 at 03:59:09PM -0400, Phil Susi wrote:
> On 8/17/2015 11:58 AM, Brian C. Lane wrote:
> > udev is responsible for making sure the device nodes are correct. You
> > can't depend on them being present without checking for them first. A
> > udevadm settle after partprobe may also help.
>
> IIRC, libparted contacts udev to wait for the dev node to be created so
> this shouldn't happen. At least if it was configured with udev.
>
That's only done for device-mapper devices. udev (especially
systemd-udev) can trigger async. actions so you have to watch out for
how parted is being called. See my patch for opening things read-only
initially for more details.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
This bug report was last modified 8 years and 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.