From 533448ae3710ddc2c19d7c7ea6dc06ccbd80cfd4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 19 Mar 2012 19:10:27 +0000 Subject: [PATCH] * udev: don't set the STARTUP flag anymore, since LVM no longer uses it. * Don't call "vgscan" anymore; VG scans are supposed to be automatic. svn path=/nixos/trunk/; revision=33275 --- modules/services/hardware/udev.nix | 8 ++------ modules/system/boot/stage-1-init.sh | 3 --- modules/tasks/lvm.nix | 4 ---- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/modules/services/hardware/udev.nix b/modules/services/hardware/udev.nix index 70e6f72acd63..c4cd394108f5 100644 --- a/modules/services/hardware/udev.nix +++ b/modules/services/hardware/udev.nix @@ -1,4 +1,4 @@ -{pkgs, config, ...}: +{ config, pkgs, ... }: with pkgs.lib; @@ -260,13 +260,9 @@ in '' # Let udev create device nodes for all modules that have already # been loaded into the kernel (or for which support is built into - # the kernel). The `STARTUP' variable is needed to force - # the LVM rules to create device nodes. See - # http://www.mail-archive.com/fedora-devel-list@redhat.com/msg10261.html - udevadm control --env=STARTUP=1 + # the kernel). udevadm trigger --action=add udevadm settle || true # wait for udev to finish - udevadm control --env=STARTUP= initctl emit -n new-devices ''; diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh index 86c35f21fab7..f3ad3313648e 100644 --- a/modules/system/boot/stage-1-init.sh +++ b/modules/system/boot/stage-1-init.sh @@ -135,10 +135,8 @@ export UDEV_CONFIG_FILE=@udevConf@ mkdir -p /dev/.udev # !!! bug in udev? mkdir -p /dev/.mdadm udevd --daemon -udevadm control --env=STARTUP=1 udevadm trigger --action=add udevadm settle || true -udevadm control --env=STARTUP= # XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered @@ -146,7 +144,6 @@ udevadm control --env=STARTUP= echo "starting device mapper and LVM..." -lvm vgscan lvm vgchange -ay if test -n "$debug1devices"; then fail; fi diff --git a/modules/tasks/lvm.nix b/modules/tasks/lvm.nix index f5a40c7f8ecd..635146ac889b 100644 --- a/modules/tasks/lvm.nix +++ b/modules/tasks/lvm.nix @@ -11,10 +11,6 @@ script = '' - # Scan for block devices that might contain LVM physical volumes - # and volume groups. - ${pkgs.lvm2}/sbin/vgscan - # Make all logical volumes on all volume groups available, i.e., # make them appear in /dev. ${pkgs.lvm2}/sbin/vgchange --available y