Bugzilla – Bug 980834
parted with --wipesignatures fails
Last modified: 2016-05-27 14:29:12 UTC
I have to build util-linux and parted myself to test the new parted option --wipesignatures. Using parted with that option fails with the error: # parted --script --wipesignatures /dev/sdb mkpart a ext4 1MiB 1025MiB Error: Partition(s) 1 on /dev/sdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes. AFAIS opening and closing the disk device to run blkid_do_probe/wipe triggers udev events that cause the device to be busy when parted wants to inform the kernel. Adding a sleep(10) after the close in parted-implement-wipesignatures-option.patch resolved to issue (as a workaround). Maybe it would be better to move the wiping to libparted and use the already existing file descriptor to not cause extra udev events. This bug prevents finishing fate #319893 since commiting the new code to the libstorage repository will cause failures in openQA testing of openSUSE.
Petr Uzel, only FYI (could be actually totally unrelated): By chance I noticed the generic parted message in comment#0 is also reported in https://github.com/cockpit-project/cockpit/issues/3177 which points to https://bugzilla.redhat.com/show_bug.cgi?id=1283112 Perhaps that issue is related to this one here and was only "Fixed in parted-3.1-23.el7" by a Red Hat patch that is not in upstream parted-3.2?
Created attachment 678504 [details] parted --wipefs: Implementation in libparted
(In reply to Arvin Schnell from comment #0) > Maybe it would be better to move the wiping to libparted and use the already > existing file descriptor to not cause extra udev events. Agreed. I updated the patch in this direction (see attachement) and submitted it to openSUSE:Factory (sr#398721). Arvin, please test it and report if it helps.
This is an autogenerated message for OBS integration: This bug (980834) was mentioned in https://build.opensuse.org/request/show/398311 Factory / parted
I have tested the fix on openSUSE Tumbleweed where I didn't find problems. Thanks.
Thanks, closing as fixed.