diff options
author | Karel Zak | 2018-01-17 16:30:06 +0100 |
---|---|---|
committer | Karel Zak | 2018-01-17 16:30:06 +0100 |
commit | aefa920a794714959c09b3352f172da3695ddff3 (patch) | |
tree | 50772cc68a1ccb3b8cf4fecbc79b6127ef2d33b7 /disk-utils | |
parent | tests: mark fincore/count as KNOWN_FAIL (diff) | |
download | kernel-qcow2-util-linux-aefa920a794714959c09b3352f172da3695ddff3.tar.gz kernel-qcow2-util-linux-aefa920a794714959c09b3352f172da3695ddff3.tar.xz kernel-qcow2-util-linux-aefa920a794714959c09b3352f172da3695ddff3.zip |
sfdisk: add hint about udev and flock to the man page
Addresses: https://github.com/karelzak/util-linux/issues/563
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | disk-utils/sfdisk.8 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8 index 14f30176f..0763906bc 100644 --- a/disk-utils/sfdisk.8 +++ b/disk-utils/sfdisk.8 @@ -58,6 +58,22 @@ does. It is necessary to explicitly create all partitions including whole-disk system partitions. +.B sfdisk +uses BLKRRPART (reread partition table) ioctl to make sure that the device is +not used by system or another tools (see also --no-reread). It's possible that +this feature or another sfdisk activity races with \fBudevd\fR. The recommended way +how to avoid possible collisions is to use exclusive flock for the whole-disk +device to serialize device access. The exclusive lock will cause udevd to skip +the event handling on the device. For example: +.RS +.sp +.nf +.B "flock /dev/sdc sfdisk /dev/sdc" +.fi +.sp +.RE +Note, this semantic is not currently supported by udevd for MD and DM devices. + .SH COMMANDS The commands are mutually exclusive. .TP |