From 4fd768957e6fae85e4019ff7621693e0683eab84 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 15 Nov 2012 10:31:27 -0500 Subject: shutdown: share dm teardown with lvm lvm is a chatty bitch and wants to tell all its friends about what it's doing. Mostly this just goes poorly with udev, but now its lvmetad as well. Use dmsetup as a shortcut and just tear down the volumes without worrying about the needless accounting. Guys? GUYS?!?! GUYS IM TEARING STUFF DOWN NOW!!!11!!!111 Fixes FS#32680. Signed-off-by: Dave Reisner --- shutdown | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/shutdown b/shutdown index e13e6fb..88ec9ca 100644 --- a/shutdown +++ b/shutdown @@ -16,18 +16,10 @@ stop_device() { read devname <"$1/dm/name" cryptsetup remove "$devname" ;; - dm) + lvm|dm) read devname <"$1/dm/name" dmsetup remove "$devname" ;; - lvm) - # disassemble the parent VG - read devname <"$1/dm/name" - lvm lvdisplay -c "/dev/mapper/$devname" | { - IFS=: read _ vgname _ - lvm vgchange --noudevsync -an "$vgname" - } - ;; raid*) # wait for arrays with external metadata to be marked as # clean. unfortunately, there isn't a whole lot we can do -- cgit v1.2.3-24-g4f1b