From a17127c46d0a635b9af17a2ef20c3a44bb3797e1 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 12 Apr 2010 19:12:39 +0200 Subject: perform udevadm settle to avoid raceconditions where the device would not be ready in time. fixes http://mailman.archlinux.org/pipermail/arch-releng/2010-April/000974.html --- src/core/libs/lib-blockdevices-filesystems.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index d701105..9a7d5d4 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -749,6 +749,10 @@ process_filesystem () lvcreate -L $fs_params $fs_opts -n $fs_label `sed 's#/dev/mapper/##' <<< $part` >$LOG 2>&1; ret=$? ;; #$opts is usually something like -L 10G # Strip '/dev/mapper/' part because device file may not exist. TODO: do i need to activate them? # don't handle anything else here, we will error later esac + # The udevadm settle is a workaround for a bug/racecondition in cryptsetup. See: + # http://mailman.archlinux.org/pipermail/arch-releng/2010-April/000974.html + # It may not be needed (anymore), or not after every type of FS, but we're rather safe then sorry. and it seems to always return in less then a second + udevadm settle BLOCK_ROLLBACK_USELESS=0 [ "$ret" -gt 0 ] && { show_warning "process_filesystem error" "Error creating filesystem $fs_type on $part."; return 1; } sleep 2 -- cgit v1.2.3-54-g00ecf