summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2008-03-29 15:42:28 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2008-03-29 15:42:28 +0000
commit758cd9b4778759ec1b2e7e3e7e80b88e629c532b (patch)
tree8bf699567921f2c6e0cd3cfd6280629bcfd65186 /sys-fs
parentstable ppc, bug 214361 (diff)
downloadhistorical-758cd9b4778759ec1b2e7e3e7e80b88e629c532b.tar.gz
historical-758cd9b4778759ec1b2e7e3e7e80b88e629c532b.tar.bz2
historical-758cd9b4778759ec1b2e7e3e7e80b88e629c532b.zip
Added locking patch and fixed patching.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/clvm/ChangeLog7
-rw-r--r--sys-fs/clvm/Manifest13
-rw-r--r--sys-fs/clvm/clvm-2.02.33.ebuild5
-rw-r--r--sys-fs/clvm/files/cluster-locking-built-in.patch100
-rwxr-xr-xsys-fs/clvm/files/clvmd.rc115
5 files changed, 172 insertions, 68 deletions
diff --git a/sys-fs/clvm/ChangeLog b/sys-fs/clvm/ChangeLog
index 39199f116d66..c6a946682215 100644
--- a/sys-fs/clvm/ChangeLog
+++ b/sys-fs/clvm/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-fs/clvm
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/ChangeLog,v 1.22 2008/03/17 19:15:52 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/ChangeLog,v 1.23 2008/03/29 15:42:27 xmerlin Exp $
+
+ 29 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org>
+ +files/cluster-locking-built-in.patch, files/clvmd.rc,
+ clvm-2.02.33.ebuild:
+ Added locking patch and fixed patching.
*clvm-2.02.33 (17 Mar 2008)
diff --git a/sys-fs/clvm/Manifest b/sys-fs/clvm/Manifest
index 29f03889ce18..3b0ce8b6b7c3 100644
--- a/sys-fs/clvm/Manifest
+++ b/sys-fs/clvm/Manifest
@@ -1,7 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX clvmd.rc 3628 RMD160 b4b8761057bb878c44b26cb07dbbb7e0d9c7758a SHA1 1ca803fad995353760698a6e90e5ead78892aed0 SHA256 0c4c2b4f8e75a9213a754d44ad11ffd05ac972c85b3f1212ebf776946b8771ce
+AUX cluster-locking-built-in.patch 3092 RMD160 bbdb31d10a94122fc823d8bab93d796cf689071c SHA1 6299d12ec1aa74a764a2c05dd0a94c6a76c34a48 SHA256 4cbfcc912af8a8227230954d3525b52d648883d4b606aedbb7cafbec418c8d7e
+AUX clvmd.rc 3448 RMD160 1ce38c44e0c16bee29600dba577671af2267c4ab SHA1 6d9305412656ef106a8375aa2a57405fc7d5e571 SHA256 e19294cb6231a3eb20bfdea1d253c1bd7e3204b8d4248118209f09a5bd9c3339
AUX clvmd.rc-2.02.33-xm 3645 RMD160 7d2645abd608ea3878ed7c7917d466ebd3e1f37b SHA1 e48747922abd16ad8f67678a48e6a4a1643ac97d SHA256 9a464510909483ddb65a1c5831cd89e400d9c704bcd7ff04160e1076f9ed878b
AUX lvm.conf-2.02.33.patch 3136 RMD160 c0292c39db064f0a4151ffccdc441be2fa78f8cf SHA1 8dbcbf66a841cc8acd889e174095df9932813a3e SHA256 63a8c21186f47979cb628970dca12df2a9f319745488a4d8a1e01f238a7fc711
AUX lvm.confd-2.02.28-r2 173 RMD160 cf554372fa11df056e3757e5139fad6c7606a696 SHA1 e8186ebb91d12247d0865285dc62346d1cbc207a SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844
@@ -15,13 +16,13 @@ DIST LVM2.2.02.09.tgz 487599 RMD160 ee56c644c567a24c3de04f1fd733072e21eaea18 SHA
DIST LVM2.2.02.33.tgz 558820 RMD160 903d72844c4b309f26f9e58c4245b4f7377e23c7 SHA1 eb96a9f0cd90bdb61a8d5d5d44bd0b066420b70a SHA256 f8af333573e37b73ecc17eb0422e2ae9918e1e4f87a72f8e4054663e7d05e4b8
EBUILD clvm-2.01.15.ebuild 1256 RMD160 1e0c2cc51cfdff5bd566a6c11ad57070e384e6a0 SHA1 52442001b80a7c27f33f2866d82c0998d56a583c SHA256 29f203b7b1e76cb64919eaa122370dc8329bd8ac5c8fd776bc4ce50b13d1ce27
EBUILD clvm-2.02.09.ebuild 1340 RMD160 ffd70edd09aa722d02d81241552c68d618a2604d SHA1 91136ffb07918a230e5f15b9a36ede15d05321c9 SHA256 0210a1d034f311fca8ccc19dfdeabd6b4ea46cd1166494d94e91b457282cd85b
-EBUILD clvm-2.02.33.ebuild 3493 RMD160 9522265a3d87911cc603556d58e802acd52c4418 SHA1 1d8e26ed49da66307bbc121a57f59a0cda7c0d33 SHA256 b249392dee9d2b3348e9ffc396101d1a93754ae81459ed1b29708da8e384f465
-MISC ChangeLog 3615 RMD160 7bdb79218a0d769fb1fb560765ef35ac11009911 SHA1 1c2605942be7b9f76ed57116d0d79389b597a050 SHA256 c7a0bf46cc79acb9176c568330979930e7a9e480a1376ac55fceb9501b23211b
+EBUILD clvm-2.02.33.ebuild 3565 RMD160 67ff5e01e9b3735c827c39f978e2b10d0cee9abf SHA1 251e8cbc9efc7cd4dd1d8593fba07973bd39ae12 SHA256 dc9c520e7ae8b1605d5834ce0914d3d558e960e3f492641e062e6cf8900447c1
+MISC ChangeLog 3792 RMD160 e353ff2a6aa2657ddcf826df2f4686297863c965 SHA1 b08254d23696349d49defea0b8241f51ce56392b SHA256 af2ef031d6a01e7e61c65e4bb7708723f501df6ab5495cf54c3585dce2fd1fd4
MISC metadata.xml 229 RMD160 4dcf17b88c5f4db2e817f473f3e8269b0bff2e6e SHA1 e6315be43241c55bdc0d12a42fa05632c5ff9b79 SHA256 49e13d2d49bef7298e3bb665ebeceeff9b0880fae5ff639cb8405993504f244f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
-iD8DBQFH3sNwgMUyd/cdjWsRAlwmAJ9zfZ4bGQAO1uX5rXAPQUjw2tgLGQCfZBfs
-wGFUZXeh6RruYcCts7jVTDM=
-=K9W4
+iD8DBQFH7mNrgMUyd/cdjWsRAhsMAJ9H6L2H+lemjE3Z4pR6bzrIwmJh1ACfbM6Q
+J7twUnrB07sBKMyijS3VAFA=
+=b1a1
-----END PGP SIGNATURE-----
diff --git a/sys-fs/clvm/clvm-2.02.33.ebuild b/sys-fs/clvm/clvm-2.02.33.ebuild
index cc323f67ff5b..ec954c91f9dd 100644
--- a/sys-fs/clvm/clvm-2.02.33.ebuild
+++ b/sys-fs/clvm/clvm-2.02.33.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/clvm-2.02.33.ebuild,v 1.1 2008/03/17 19:15:52 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/clvm-2.02.33.ebuild,v 1.2 2008/03/29 15:42:27 xmerlin Exp $
inherit eutils multilib
@@ -29,7 +29,10 @@ S="${WORKDIR}/${MY_P}"
src_unpack() {
unpack ${A}
+ cd "${S}"
+
epatch "${FILESDIR}"/lvm.conf-2.02.33.patch || die
+ epatch "${FILESDIR}"/cluster-locking-built-in.patch || die
}
src_compile() {
diff --git a/sys-fs/clvm/files/cluster-locking-built-in.patch b/sys-fs/clvm/files/cluster-locking-built-in.patch
new file mode 100644
index 000000000000..52fb82380ed7
--- /dev/null
+++ b/sys-fs/clvm/files/cluster-locking-built-in.patch
@@ -0,0 +1,100 @@
+--- LVM2.2.02.12-old/scripts/lvmconf.sh 2006-09-20 18:36:47.000000000 +0100
++++ LVM2.2.02.12/scripts/lvmconf.sh 2006-10-20 19:20:26.000000000 +0100
+@@ -36,7 +36,7 @@ function parse_args
+ while [ -n "$1" ]; do
+ case $1 in
+ --enable-cluster)
+- LOCKING_TYPE=2
++ LOCKING_TYPE=3
+ shift
+ ;;
+ --disable-cluster)
+@@ -94,15 +94,13 @@ function validate_args
+
+ if [ -n "$LOCKINGLIBDIR" ]; then
+
+- [ -z "$LOCKINGLIB" ] && LOCKINGLIB="liblvm2clusterlock.so"
+-
+ if [ "${LOCKINGLIBDIR:0:1}" != "/" ]
+ then
+ echo "Prefix must be an absolute path name (starting with a /)"
+ exit 12
+ fi
+
+- if [ ! -f "$LOCKINGLIBDIR/$LOCKINGLIB" ]
++ if [ -n "$LOCKINGLIB" ] && [ ! -f "$LOCKINGLIBDIR/$LOCKINGLIB" ]
+ then
+ echo "$LOCKINGLIBDIR/$LOCKINGLIB does not exist, did you do a \"make install\" ?"
+ exit 11
+@@ -170,13 +168,29 @@ then
+ if [ -z "$LOCKING_TYPE" ]; then
+ LOCKING_TYPE=1
+ fi
+- if [ "$LOCKING_TYPE" = "2" ]; then
++ if [ "$LOCKING_TYPE" = "3" ] || [ "$LOCKING_TYPE" = "2" ]; then
+ cat $CONFIGFILE - <<EOF > $TMPFILE
+ global {
+ # Enable locking for cluster LVM
+ locking_type = $LOCKING_TYPE
+ library_dir = "$LOCKINGLIBDIR"
++EOF
++ if [ $? != 0 ]
++ then
++ echo "failed to create temporary config file, $CONFIGFILE not updated"
++ exit 14
++ fi
++ if [ -n "$LOCKINGLIB" ]; then
++ cat - <<EOF >> $TMPFILE
+ locking_library = "$LOCKINGLIB"
++EOF
++ if [ $? != 0 ]
++ then
++ echo "failed to create temporary config file, $CONFIGFILE not updated"
++ exit 16
++ fi
++ fi
++ cat - <<EOF >> $TMPFILE
+ }
+ EOF
+ fi # if we aren't setting cluster locking, we don't need to create a global section
+@@ -184,7 +198,7 @@ EOF
+ if [ $? != 0 ]
+ then
+ echo "failed to create temporary config file, $CONFIGFILE not updated"
+- exit 14
++ exit 17
+ fi
+ else
+ #
+@@ -208,8 +222,10 @@ else
+ else
+ SEDCMD="${SEDCMD}\n/global[[:blank:]]*{/a\ \ \ \ library_dir = \"$LOCKINGLIBDIR\""
+ fi
++ fi
+
+- if [ "$have_library" = "0" ]
++ if [ -n "$LOCKINGLIB" ]; then
++ if [ "$have_library" = "0" ]
+ then
+ SEDCMD="${SEDCMD}\ns/^[[:blank:]]*locking_library[[:blank:]]*=.*/\ \ \ \ locking_library = \"$LOCKINGLIB\"/g"
+ else
+@@ -217,19 +233,6 @@ else
+ fi
+ fi
+
+- if [ "$LOCKING_TYPE" = "1" ]; then
+- # if we're not using cluster locking, remove the library dir and locking library name
+- if [ "$have_dir" = "0" ]
+- then
+- SEDCMD="${SEDCMD}\n/^[[:blank:]]*library_dir[[:blank:]]*=.*/d"
+- fi
+-
+- if [ "$have_library" = "0" ]
+- then
+- SEDCMD="${SEDCMD}\n/^[[:blank:]]*locking_library[[:blank:]]*=.*/d"
+- fi
+- fi
+-
+ echo -e $SEDCMD > $SCRIPTFILE
+ sed <$CONFIGFILE >$TMPFILE -f $SCRIPTFILE
+ if [ $? != 0 ]
diff --git a/sys-fs/clvm/files/clvmd.rc b/sys-fs/clvm/files/clvmd.rc
index df0caf858e90..4222bbb99b0b 100755
--- a/sys-fs/clvm/files/clvmd.rc
+++ b/sys-fs/clvm/files/clvmd.rc
@@ -1,16 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/clvmd.rc,v 1.3 2006/05/17 18:19:05 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/clvmd.rc,v 1.4 2008/03/29 15:42:28 xmerlin Exp $
+
+CLVM_BIN="/sbin/clvmd"
+VGCHANGE="/sbin/vgchange"
+VGSCAN="/sbin/vgscan"
+VGDISPLAY="/sbin/vgdisplay"
depend() {
use dns logger
use net
- need cluster-manager cluster-locking-manager fenced
+ need cman
+ before gfs
}
-exefile=/sbin/clvmd
-
load_modules() {
local module modules
modules=$1
@@ -63,84 +67,75 @@ umount_gfs_filesystems() {
fi
}
-
-
start() {
- local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
+ local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
+
if [ -z "${module}" ]; then
- load_modules dm-mod
+ load_modules "dm-mod"
sleep 1s
fi
ebegin "Starting clvmd"
- start-stop-daemon --start --quiet --exec ${exefile}
+ start-stop-daemon --start --quiet --exec ${CLVM_BIN}
eend $?
ebegin "Scanning LVM volumes"
- /sbin/vgscan &>/dev/null
+ ${VGSCAN} &>/dev/null
eend $?
- if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ]
+ #if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ]
+ #then
+ # ebegin "Setting up the Logical Volume Manager"
+ # /sbin/vgchange -aly >/dev/null
+ # eend $? "Failed to setup the LVM"
+ #fi
+
+ if [ -n "$LVM_VGS" ]
then
- ebegin "Setting up the Logical Volume Manager"
- /sbin/vgchange -aly >/dev/null
- eend $? "Failed to setup the LVM"
+ for vg in $LVM_VGS
+ do
+ ebegin " Activating VG: ${vg} "
+ $VGCHANGE -ayl ${vg} >/dev/null
+ eend $?
+ done
+ else
+ clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
+ for vg in $clustervgs; do
+ ebegin " Activating Clustered VG: ${vg} "
+ $VGCHANGE -ayl ${vg} >/dev/null
+ eend $?
+ done
fi
-
}
stop() {
-
# umount GFS filesystems
umount_gfs_filesystems
-
- einfo "Shutting down the Logical Volume Manager"
-
- LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|awk '{print $3}'|sort|xargs echo`
- VOLUME_GROUPS=`vgdisplay |grep "VG Name"|awk '{print $3}'|sort|xargs echo`
- for x in ${LOGICAL_VOLUMES}
- do
- LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|awk '{print $3}'`
- if [ "${LV_IS_ACTIVE}" = 0 ]
- then
- ebegin " Shutting Down logical volume: ${x} "
- lvchange -an --ignorelockingfailure -P ${x} >/dev/null
- eend $?
- fi
- done
- for x in ${VOLUME_GROUPS}
- do
- VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|awk '{print $3}'|xargs echo`
- if [ "${VG_HAS_ACTIVE_LV}" = 0 ]
- then
- ebegin " Shutting Down volume group: ${x} "
- vgchange -an --ignorelockingfailure -P ${x} >/dev/null
- eend
- fi
- done
+ sleep 2
- for x in ${LOGICAL_VOLUMES}
- do
- LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|awk '{print $3}'`
- if [ "${LV_IS_ACTIVE}" = 1 ]
- then
-
- ROOT_DEVICE=`mount|grep " / "|awk '{print $1}'`
- if [ ! ${ROOT_DEVICE} = ${x} ]
- then
- ewarn " Unable to shutdown: ${x} "
- fi
- fi
- done
- einfo "Finished Shutting down the Logical Volume Manager"
+ if [ -n "$LVM_VGS" ]
+ then
+ for vg in $LVM_VGS
+ do
+ ebegin " Shutting Down VG: ${vg} "
+ $VGCHANGE -anl ${vg} >/dev/null
+ eend $?
+ done
+ else
+ # Deactivate only clustered volumes
+ clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
+ for vg in $clustervgs; do
+ ebegin " Shutting Down Clustered VG: ${vg} "
+ $VGCHANGE -anl ${vg} >/dev/null
+ eend $?
+ done
+ fi
ebegin "Stopping clvmd"
- start-stop-daemon --stop --quiet --exec ${exefile}
+ #start-stop-daemon --stop -s 9 --quiet --exec ${CLVM_BIN} --name clvmd
+ killall -TERM ${CLVM_BIN} >/dev/null
eend $?
-
- if [ "$?" -eq 0 ]; then
- unload_modules dm-mod
- fi
+
}