GNU bug report logs - #21272
partprobe does not wait for refresh of partition info

Previous Next

Package: parted;

Reported by: Bjoern Eberth <bjoern.eberth <at> gmail.com>

Date: Sun, 16 Aug 2015 00:47:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Bjoern Eberth <bjoern.eberth <at> gmail.com>
To: 21272 <at> debbugs.gnu.org
Subject: bug#21272: partprobe does not wait for refresh of partition info
Date: Sun, 16 Aug 2015 01:22:15 +0200
[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)]

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.