[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How best to wait for partition table kernel reload?
From: |
Harvey Chapman |
Subject: |
How best to wait for partition table kernel reload? |
Date: |
Tue, 22 Jun 2010 17:03:46 -0400 |
Summary: After using parted, the modified device files (/dev/sda1, etc.) have
not been restored before the next line in a script trying to use them.
parted-2.3
linux-2.6.34
busybox-1.13.2 (using mdev with sequence numbers)
ntfsprogs-2.0.0
I have a bash script that resizes an NTFS partition using parted and
ntfsresize. I seem to have a race condition where sometimes, the device files
for the device just modifed have not yet been recreated before calling
ntfsresize. Is there anything I can do about this? I did have a problem with
mdev performing the hotplug actions out of order, but that seems to have been
fixed. I don't really want to sprinkle sleeps all throughout my scripts either.
I did that in one place, but on an older (read: slower) machine, that failed.
Is there a best practice way of doing this? Does anyone know how GParted
handles this?
I don't have this problem with linux-2.6.31.5 and parted-1.8.9(ubuntu 8.10),
but I'd like to upgrade to get bug fixes and features.
Thank you,
Harvey
- How best to wait for partition table kernel reload?,
Harvey Chapman <=