]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: add hint about udev and flock to the man page
authorKarel Zak <kzak@redhat.com>
Wed, 17 Jan 2018 15:30:06 +0000 (16:30 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 17 Jan 2018 15:30:06 +0000 (16:30 +0100)
Addresses: https://github.com/karelzak/util-linux/issues/563
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.8

index 14f30176fc6b908b6f5c17888ba8adcea1d5654d..0763906bc0647aa0cc022bbc3c3cf3fae9bc7574 100644 (file)
@@ -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