bug#21272: partprobe does not wait for refresh of partition info

"Brian C. Lane" <[email protected]>
Newsgroups gmane.comp.gnu.parted.bugs
Message-ID <[email protected]>
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@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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.