On Saturday 06 June 2015 12:09 AM, Patrick Schleizer wrote: >> > When you add/remove *partitions*, yes. That's understood. > Can you please elaborate on this? > > What would be the right course of action, so we don't have to hardcode > "sleep 2"? Is there any command that would wait until kpartx is ready? > Or that would tell us whether it's safe now or not to use kpartx?
It is a timing problem. And the timing can greatly vary based on the amount of task your machine is performing at that time. Given the current limitations, the wise option I thought was to make kpartx try a little longer. For this, I've submitted a patch upstream increasing kpartx's retry from 3 seconds to 5 seconds. Why 5 seconds ? I have no logical reasoning. If it gets accepted upstream, it will show up in the next release. Meanwhile, if you want to test it, you can pick the patch from the upstream mailing list and try. https://www.redhat.com/archives/dm-devel/2015-May/msg00087.html -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System
signature.asc
Description: OpenPGP digital signature

