Red Hat Bugzilla – Bug 1283112
parted races with systemd-udevd
Last modified: 2018-01-05 08:10:09 EST
Description of problem:
Both parted and systemd-udevd tell the kernel about new partitions, and if circumstances are right, parted fails with an error message because it tries to tell the kernel about a partition that it already knows about.
This has probably been addressed in some way already, since I don't see this with parted 3.2.
Version-Release number of selected component (if applicable):
'Always' when the circumstances are right, but very seldom normally. Loading the system to about 100% CPU with "while true; do true; done" did the trick for me.
Tell me if you want to reproduce this.
*** Bug 1283128 has been marked as a duplicate of this bug. ***
This is 'fixed' in 3.1-23 by changing parted so that it will probe using read only, and only close the r/w file descriptor when finished running.
Note that if you are calling parted multiple times from a script and not checking for device nodes to appear/disappear/whatever you will end up in the same situation. It is best to combine all the commands into a single parted call, or check for the expected changes between the calls.
*** This bug has been marked as a duplicate of bug 1245144 ***