[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Exposing the same VG from two different disks





> I've had a closer look at the vgimportclone script and I think the fix for the
> lost filter is very straight forward. The errors are coming out of the final
> vgscan and it seems to be caused by the LVM_SYSTEM_DIR variable being set to an 
> empty string rather than being unset. So I made the following change and it 
> seemed to fix the errors...

Cool, I'd kind of noticed this bit of weirdness but hadn't got round to actually doing anything about it :)

LVM_SYSTEM_DIR also gets reset in the cleanup function (which pointless because our changes are dropped when the script ends anyway so we might as well get rid of it, also we're using #!/bin/sh  but assuming several bash-isms so this is a cleanup patch that covers both (hopefully I've figured out how to create proper patches!):

diff --git a/vgimportclone.sh b/vgimportclone.sh
--- a/vgimportclone.sh
+++ b/vgimportclone.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Copyright (C) 2009 Chris Procter All rights reserved.
 # Copyright (C) 2009 Red Hat, Inc. All rights reserved.
@@ -87,8 +87,6 @@
 
 
 function cleanup {
-    #set to use old lvm.conf
-    LVM_SYSTEM_DIR=${ORIG_LVM_SYS_DIR}
 
     if [ $KEEP_TMP_LVM_SYSTEM_DIR -eq 1 ]; then
         echo "${SCRIPTNAME}: LVM_SYSTEM_DIR (${TMP_LVM_SYSTEM_DIR}) must be cleaned up manually."


      


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]