summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2008-03-17 19:15:53 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2008-03-17 19:15:53 +0000
commit720b09f87b7b53cb3fcbe2dd0de2f183cb52133b (patch)
treec7611fba2bb5a859f1a602b8bcc756d711526a31 /sys-fs
parente2fsprogs-1.40.4 also needs tls disabled on uClibc. (diff)
downloadhistorical-720b09f87b7b53cb3fcbe2dd0de2f183cb52133b.tar.gz
historical-720b09f87b7b53cb3fcbe2dd0de2f183cb52133b.tar.bz2
historical-720b09f87b7b53cb3fcbe2dd0de2f183cb52133b.zip
Version bump, clvm-2.02.33 will be the starting point to merge clvm in lvm, everything before 2.02.33 will be removed soon.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/clvm/ChangeLog14
-rw-r--r--sys-fs/clvm/Manifest24
-rw-r--r--sys-fs/clvm/clvm-2.01.15.ebuild10
-rw-r--r--sys-fs/clvm/clvm-2.02.09.ebuild10
-rw-r--r--sys-fs/clvm/clvm-2.02.33.ebuild117
-rwxr-xr-xsys-fs/clvm/files/clvmd.rc-2.02.33-xm146
-rw-r--r--sys-fs/clvm/files/lvm.conf-2.02.33.patch89
-rw-r--r--sys-fs/clvm/files/lvm.confd-2.02.28-r25
-rw-r--r--sys-fs/clvm/files/lvm.rc-2.02.28-r229
-rw-r--r--sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm34
-rwxr-xr-xsys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm61
11 files changed, 524 insertions, 15 deletions
diff --git a/sys-fs/clvm/ChangeLog b/sys-fs/clvm/ChangeLog
index 9edb4192a62f..39199f116d66 100644
--- a/sys-fs/clvm/ChangeLog
+++ b/sys-fs/clvm/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-fs/clvm
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/ChangeLog,v 1.21 2007/04/26 07:37:23 dberkholz Exp $
+# 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 $
+
+*clvm-2.02.33 (17 Mar 2008)
+
+ 17 Mar 2008; Christian Zoffoli <xmerlin@gentoo.org>
+ +files/lvm.confd-2.02.28-r2, +files/lvm.rc-2.02.28-r2,
+ +files/clvmd.rc-2.02.33-xm, +files/lvm2-start.sh-2.02.33-xm,
+ +files/lvm2-stop.sh-2.02.33-xm, +files/lvm.conf-2.02.33.patch,
+ clvm-2.01.15.ebuild, clvm-2.02.09.ebuild, +clvm-2.02.33.ebuild:
+ Version bump, clvm-2.02.33 will be the starting point to merge clvm in lvm,
+ everything before 2.02.33 will be removed soon.
26 Apr 2007; Donnie Berkholz <dberkholz@gentoo.org>; metadata.xml:
Update for cluster herd split to hp-cluster and ha-cluster.
diff --git a/sys-fs/clvm/Manifest b/sys-fs/clvm/Manifest
index 131e03661401..29f03889ce18 100644
--- a/sys-fs/clvm/Manifest
+++ b/sys-fs/clvm/Manifest
@@ -1,9 +1,27 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX clvmd.rc 3628 RMD160 b4b8761057bb878c44b26cb07dbbb7e0d9c7758a SHA1 1ca803fad995353760698a6e90e5ead78892aed0 SHA256 0c4c2b4f8e75a9213a754d44ad11ffd05ac972c85b3f1212ebf776946b8771ce
+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
+AUX lvm.rc-2.02.28-r2 639 RMD160 17eea9c06fe349e02e132177eab6e4ce92dd73ef SHA1 3317a158eed96d03c569aa1353dc65eab4bba167 SHA256 98988561a572c577e614ca11df8631829af5d6b3ebda467c79b29c8cd44d8f0c
AUX lvm2-start.sh 991 RMD160 ef2f8a7b53c51bf690371477efe5889c4bf1060f SHA1 62e9c2e14756e10ab0db209e9306a31b28ad4075 SHA256 093ff817ce902cb56279bcf6b59962323413831098eb4a4414d641ddbc93ef35
+AUX lvm2-start.sh-2.02.33-xm 1182 RMD160 e272346185782bdff09176a6ae74e1a5e381f433 SHA1 7d0e59f226dd181e48e6e9f23e23be8f9d5637b2 SHA256 353fea1fa16ade9768a0d20f36a23816eae55f6fe4600d75bb77c492d843332f
AUX lvm2-stop.sh 1941 RMD160 6fcb780e95f5434beee7897428847f6652c1f330 SHA1 8d2ff11e09a04594d339fd1f71dd8011b449b3b2 SHA256 e2d20df350495c1178180cda92b8c6059dba048aad319528aa979e19ad07e50f
+AUX lvm2-stop.sh-2.02.33-xm 1952 RMD160 23e34c8d93ca24401d0045a6ca13fb6f4846ee72 SHA1 ccff4d9f744d83da862a11cae72e562ea9164fee SHA256 06521e5f9f88e44b4feedfcbf0179a8da6b74c321a754da0f62f300197707853
DIST LVM2.2.01.15.tgz 466225 RMD160 3e83eb86b4705212c01d688d4779f9f95007c365 SHA1 115d2ad69d2b0c280578774442c4f669bfb6cf1e SHA256 80b47604ace83db4450f43d94a99fdf2ca317323fde8a591f57290d28ece7d3b
DIST LVM2.2.02.09.tgz 487599 RMD160 ee56c644c567a24c3de04f1fd733072e21eaea18 SHA1 0fc3e524a19129234141578de17492febfea8ac1 SHA256 d6493169666058ea7514b6782de9985d1df1230fcca072306dbe645bb91ac177
-EBUILD clvm-2.01.15.ebuild 1250 RMD160 60d6b7f89043bb1c44e4a5d809cd852064914ff4 SHA1 6400d640c5f5ddba221069a1ff1b762b1c3f2619 SHA256 53f1bc5e6548cece7779e71cd55e2b5a684ad3cd41ca34b8be6a5e7564d3fff1
-EBUILD clvm-2.02.09.ebuild 1334 RMD160 cb4c29b9ec5a2cd4d7a9b8e239b875a910cead1a SHA1 74defa79af5c9362c647e2c8dfc8cea2ee2abb9d SHA256 9a11156038427f4461596bffaafba9c1b490481ba579ef8575a3bbec16111fd7
-MISC ChangeLog 3154 RMD160 9537ee51da950e6d59dc95440b845976ed2e16b3 SHA1 1cf85f90cd5e5b65714d6b546903c42f398b2e86 SHA256 4f48db0f595acdbd0e14f59c326a886d2b5df5cc720e64ade3182d74d49e3590
+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
MISC metadata.xml 229 RMD160 4dcf17b88c5f4db2e817f473f3e8269b0bff2e6e SHA1 e6315be43241c55bdc0d12a42fa05632c5ff9b79 SHA256 49e13d2d49bef7298e3bb665ebeceeff9b0880fae5ff639cb8405993504f244f
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.7 (GNU/Linux)
+
+iD8DBQFH3sNwgMUyd/cdjWsRAlwmAJ9zfZ4bGQAO1uX5rXAPQUjw2tgLGQCfZBfs
+wGFUZXeh6RruYcCts7jVTDM=
+=K9W4
+-----END PGP SIGNATURE-----
diff --git a/sys-fs/clvm/clvm-2.01.15.ebuild b/sys-fs/clvm/clvm-2.01.15.ebuild
index 82aee1eff58a..e8954a0ce138 100644
--- a/sys-fs/clvm/clvm-2.01.15.ebuild
+++ b/sys-fs/clvm/clvm-2.01.15.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# 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.01.15.ebuild,v 1.6 2006/10/18 10:41:06 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/clvm-2.01.15.ebuild,v 1.7 2008/03/17 19:15:52 xmerlin Exp $
MY_P="${PN/clvm/LVM2}.${PV}"
@@ -44,10 +44,10 @@ src_install() {
dodoc COPYING* INSTALL README VERSION WHATS_NEW doc/*.{conf,c,txt}
- newinitd ${FILESDIR}/clvmd.rc clvmd || die
+ newinitd "${FILESDIR}"/clvmd.rc clvmd || die
insinto /lib/rcscripts/addons
- newins ${FILESDIR}/lvm2-start.sh lvm-start.sh || die
- newins ${FILESDIR}/lvm2-stop.sh lvm-stop.sh || die
+ newins "${FILESDIR}"/lvm2-start.sh lvm-start.sh || die
+ newins "${FILESDIR}"/lvm2-stop.sh lvm-stop.sh || die
}
diff --git a/sys-fs/clvm/clvm-2.02.09.ebuild b/sys-fs/clvm/clvm-2.02.09.ebuild
index 5180361e11cf..cbef399c9fe4 100644
--- a/sys-fs/clvm/clvm-2.02.09.ebuild
+++ b/sys-fs/clvm/clvm-2.02.09.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# 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.09.ebuild,v 1.3 2006/10/18 10:41:06 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/clvm-2.02.09.ebuild,v 1.4 2008/03/17 19:15:52 xmerlin Exp $
MY_P="${PN/clvm/LVM2}.${PV}"
@@ -47,9 +47,9 @@ src_install() {
dodoc COPYING* INSTALL README VERSION WHATS_NEW doc/*.{conf,c,txt}
- newinitd ${FILESDIR}/clvmd.rc clvmd || die
+ newinitd "${FILESDIR}"/clvmd.rc clvmd || die
insinto /lib/rcscripts/addons
- newins ${FILESDIR}/lvm2-start.sh lvm-start.sh || die
- newins ${FILESDIR}/lvm2-stop.sh lvm-stop.sh || die
+ newins "${FILESDIR}"/lvm2-start.sh lvm-start.sh || die
+ newins "${FILESDIR}"/lvm2-stop.sh lvm-stop.sh || die
}
diff --git a/sys-fs/clvm/clvm-2.02.33.ebuild b/sys-fs/clvm/clvm-2.02.33.ebuild
new file mode 100644
index 000000000000..cc323f67ff5b
--- /dev/null
+++ b/sys-fs/clvm/clvm-2.02.33.ebuild
@@ -0,0 +1,117 @@
+# 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 $
+
+inherit eutils multilib
+
+MY_P="${PN/clvm/LVM2}.${PV}"
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software."
+HOMEPAGE="http://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="readline static selinux"
+
+DEPEND=">=sys-fs/device-mapper-1.02.24
+ =sys-cluster/dlm-2*
+ =sys-cluster/cman-2*
+ "
+
+RDEPEND="${DEPEND}
+ !sys-fs/lvm-user
+ !sys-fs/lvm2"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/lvm.conf-2.02.33.patch || die
+}
+
+src_compile() {
+ # Static compile of lvm2 so that the install described in the handbook works
+ # http://www.gentoo.org/doc/en/lvm2.xml
+ # fixes http://bugs.gentoo.org/show_bug.cgi?id=84463
+ local myconf
+ local buildmode
+
+ # fsadm is broken, don't include it (2.02.28)
+ myconf="${myconf} --enable-dmeventd --enable-cmdlib"
+
+ # Most of this package does weird stuff.
+ # The build options are tristate, and --without is NOT supported
+ # options: 'none', 'internal', 'shared'
+ if use static ; then
+ einfo "Building static LVM, for usage inside genkernel"
+ myconf="${myconf} --enable-static_link"
+ buildmode="internal"
+ else
+ ewarn "Building shared LVM, it will not work inside genkernel!"
+ buildmode="shared"
+ fi
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ myconf="${myconf} --with-mirrors=internal"
+ myconf="${myconf} --with-snapshots=internal"
+
+ myconf="${myconf} --with-lvm1=none"
+
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532)
+ use hppa && myconf="${myconf} --disable-o_direct"
+
+ myconf="${myconf} --with-cluster=${buildmode}"
+ # 4-state!
+ myconf="${myconf} --with-clvmd=cman"
+ myconf="${myconf} --with-pool=${buildmode}"
+
+ myconf="${myconf} --sbindir=/sbin --with-staticdir=/sbin"
+ econf $(use_enable readline) \
+ $(use_enable selinux) \
+ --libdir=/usr/$(get_libdir) \
+ ${myconf} \
+ CLDFLAGS="${LDFLAGS}" || die
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ # TODO: At some point in the future, we need to stop installing the static
+ # as the /sbin/lvm name, and have both variants seperate.
+ if use static; then
+ cp -f "${D}"/sbin/lvm.static "${D}"/sbin/lvm \
+ || die "Failed to copy lvm.static"
+ fi
+
+ dodir /$(get_libdir)
+ # Put these in root so we can reach before /usr is up
+ for i in libdevmapper-event-lvm2mirror liblvm2{format1,snapshot} ; do
+ b="${D}"/usr/$(get_libdir)/${i}
+ if [ -f "${b}".so ]; then
+ mv -f "${b}".so* "${D}"/$(get_libdir) || die
+ fi
+ done
+
+ dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt}
+ insinto /lib/rcscripts/addons
+ newins "${FILESDIR}"/lvm2-start.sh-2.02.33-xm lvm-start.sh || die
+ newins "${FILESDIR}"/lvm2-stop.sh-2.02.33-xm lvm-stop.sh || die
+ newinitd "${FILESDIR}"/lvm.rc-2.02.28-r2 lvm || die
+ newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die
+ newinitd "${FILESDIR}"/clvmd.rc-2.02.33-xm clvmd || die
+
+ elog ""
+ elog "Rebuild your genkernel initramfs if you are using lvm"
+ use nolvmstatic && \
+ elog "USE=nolvmstatic has changed to USE=static via package.use"
+}
+
+pkg_postinst() {
+ elog "lvm volumes are no longer automatically created for"
+ elog "baselayout-2 users. If you are using baselayout-2, be sure to"
+ elog "run: # rc-update add lvm boot"
+}
diff --git a/sys-fs/clvm/files/clvmd.rc-2.02.33-xm b/sys-fs/clvm/files/clvmd.rc-2.02.33-xm
new file mode 100755
index 000000000000..6e97248c1ae5
--- /dev/null
+++ b/sys-fs/clvm/files/clvmd.rc-2.02.33-xm
@@ -0,0 +1,146 @@
+#!/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-2.02.33-xm,v 1.1 2008/03/17 19:15:53 xmerlin Exp $
+
+CLVM_BIN="/sbin/clvmd"
+VGCHANGE="/sbin/vgchange"
+VGSCAN="/sbin/vgscan"
+VGDISPLAY="/sbin/vgdisplay"
+
+depend() {
+ use dns logger
+ use net
+ need cman
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module}
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module}
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+umount_gfs_filesystems() {
+ local sig retry
+ local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+
+ if [ -n "${remaining}" ]
+ then
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+}
+
+start() {
+
+ local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
+
+ if [ -z "${module}" ]; then
+ load_modules "dm-mod"
+ sleep 1s
+ fi
+
+ ebegin "Starting clvmd"
+ start-stop-daemon --start --quiet --exec ${CLVM_BIN}
+ eend $?
+
+ ebegin "Scanning LVM volumes"
+ ${VGSCAN} &>/dev/null
+ eend $?
+
+ #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
+ 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
+
+ #for rtrn in 0
+ #do
+ 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 -s 9 --quiet --exec ${CLVM_BIN} --name clvmd
+ killall -TERM ${CLVM_BIN} >/dev/null
+ eend $?
+
+ local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
+
+ if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
+ unload_modules "dm-mod"
+ fi
+}
diff --git a/sys-fs/clvm/files/lvm.conf-2.02.33.patch b/sys-fs/clvm/files/lvm.conf-2.02.33.patch
new file mode 100644
index 000000000000..dd80f8b0fbb8
--- /dev/null
+++ b/sys-fs/clvm/files/lvm.conf-2.02.33.patch
@@ -0,0 +1,89 @@
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.33.orig/doc/example.conf LVM2.2.02.33/doc/example.conf
+--- LVM2.2.02.33.orig/doc/example.conf 2008-01-09 07:32:19.000000000 -0800
++++ LVM2.2.02.33/doc/example.conf 2008-02-06 17:39:20.439958042 -0800
+@@ -49,7 +49,9 @@
+
+
+ # By default we accept every block device:
+- filter = [ "a/.*/" ]
++ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
++ # noise when you probed while not available.
++ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
+
+ # Exclude the cdrom drive
+ # filter = [ "r|/dev/cdrom|" ]
+@@ -85,7 +87,7 @@
+ # If sysfs is mounted (2.6 kernels) restrict device scanning to
+ # the block devices it believes are valid.
+ # 1 enables; 0 disables.
+- sysfs_scan = 1
++ sysfs_scan = 1
+
+ # By default, LVM2 will ignore devices used as components of
+ # software RAID (md) devices by looking for md superblocks.
+@@ -218,12 +220,14 @@
+ # e.g. vgscan.lvm1 and they will stop working after you start using
+ # the new lvm2 on-disk metadata format.
+ # The default value is set when the tools are built.
+- # fallback_to_lvm1 = 0
++ # Gentoo: the LVM tools are a seperate package.
++ fallback_to_lvm1 = 0
+
+ # The default metadata format that commands should use - "lvm1" or "lvm2".
+ # The command line override is -M1 or -M2.
+ # Defaults to "lvm1" if compiled in, else "lvm2".
+- # format = "lvm1"
++ # Gentoo: default to LVM2 format
++ format = "lvm2"
+
+ # Location of proc filesystem
+ proc = "/proc"
+@@ -350,12 +354,12 @@
+
+ # Metadata settings
+ #
+-# metadata {
++metadata {
+ # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
+ # You might want to override it from the command line with 0
+ # when running pvcreate on new PVs which are to be added to large VGs.
+-
+- # pvmetadatacopies = 1
++ # Gentoo: enabled for data safety
++ pvmetadatacopies = 2
+
+ # Approximate default size of on-disk metadata areas in sectors.
+ # You should increase this if you have large volume groups or
+@@ -377,11 +381,11 @@
+ # the supplied toolset to make changes (e.g. vgcfgrestore).
+
+ # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
+-#}
++}
+
+ # Event daemon
+-#
+-# dmeventd {
++# Gentoo: uncommented, since we provide the dmeventd init script
++dmeventd {
+ # mirror_library is the library used when monitoring a mirror device.
+ #
+ # "libdevmapper-event-lvm2mirror.so" attempts to recover from
+@@ -389,7 +393,7 @@
+ # reconfigures a mirror as necessary. If no mirror library is
+ # provided, mirrors are not monitored through dmeventd.
+
+- # mirror_library = "libdevmapper-event-lvm2mirror.so"
++ mirror_library = "libdevmapper-event-lvm2mirror.so"
+
+ # snapshot_library is the library used when monitoring a snapshot device.
+ #
+@@ -398,6 +402,6 @@
+ # snapshot exceedes 80%. The warning is repeated when 85%, 90% and
+ # 95% of the snapshot are filled.
+
+- # snapshot_library = "libdevmapper-event-lvm2snapshot.so"
+-#}
++ snapshot_library = "libdevmapper-event-lvm2snapshot.so"
++}
+
diff --git a/sys-fs/clvm/files/lvm.confd-2.02.28-r2 b/sys-fs/clvm/files/lvm.confd-2.02.28-r2
new file mode 100644
index 000000000000..2fbd8668c376
--- /dev/null
+++ b/sys-fs/clvm/files/lvm.confd-2.02.28-r2
@@ -0,0 +1,5 @@
+# LVM should normally only be started after mdraid is available
+# this is because LVM physical volumes are very often MD devices.
+RC_AFTER="mdraid"
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-fs/clvm/files/lvm.rc-2.02.28-r2 b/sys-fs/clvm/files/lvm.rc-2.02.28-r2
new file mode 100644
index 000000000000..2f64a7f07b30
--- /dev/null
+++ b/sys-fs/clvm/files/lvm.rc-2.02.28-r2
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm.rc-2.02.28-r2,v 1.1 2008/03/17 19:15:53 xmerlin Exp $
+
+depend() {
+ if [ -e /lib/librc.so ]; then
+ # on baselayout-1 this causes
+ # dependency-cycles with checkroot (before *)
+ before checkfs fsck
+ after modules
+ fi
+}
+
+start() {
+ if [ ! -e /lib/librc.so ]; then
+ eerror "The $SVCNAME init-script is written for baselayout-2!"
+ eerror "Please do not use it with baselayout-1!".
+ return 1
+ fi
+
+ start_addon lvm
+}
+
+stop() {
+ stop_addon lvm
+}
+
+# vim:ts=4
diff --git a/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm b/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm
new file mode 100644
index 000000000000..df07fa74406d
--- /dev/null
+++ b/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm
@@ -0,0 +1,34 @@
+# /lib/rcscripts/addons/lvm2-start.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm,v 1.1 2008/03/17 19:15:53 xmerlin Exp $
+
+# LVM support for /usr, /home, /opt ....
+# This should be done *before* checking local
+# volumes, or they never get checked.
+
+# NOTE: Add needed modules for LVM or RAID, etc
+# to /etc/modules.autoload if needed
+if [[ -z ${CDBOOT} ]] && [[ -x /sbin/vgscan ]] ; then
+ if [[ -e /proc/modules ]] && \
+ ! grep -qs 'device-mapper' /proc/{devices,misc}
+ then
+ modprobe dm-mod &>/dev/null
+ fi
+
+ if [[ -d /proc/lvm ]] || grep -qs 'device-mapper' /proc/{devices,misc} ; then
+ ebegin "Setting up the Logical Volume Manager"
+ #still echo stderr for debugging
+ /sbin/vgscan --mknodes --ignorelockingfailure >/dev/null
+ if [[ $? == 0 ]] && [[ -x /sbin/vgchange ]] && \
+ [[ -f /etc/lvmtab || -d /etc/lvm ]]
+ then
+ noclustervgs=`/sbin/vgdisplay 2> /dev/null | \
+ awk 'BEGIN {RS="VG Name"} {if (!/Clustered/) { if ($1 != "---") print $1; } }'`
+ for vg in $noclustervgs; do
+ /sbin/vgchange --ignorelockingfailure -a y ${vg} >/dev/null
+ done
+ fi
+ eend $? "Failed to setup the LVM"
+ fi
+fi
+
+# vim:ts=4
diff --git a/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm b/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm
new file mode 100755
index 000000000000..fa69533d51ae
--- /dev/null
+++ b/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm
@@ -0,0 +1,61 @@
+# /lib/rcscripts/addons/lvm2-stop.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm,v 1.1 2008/03/17 19:15:53 xmerlin Exp $
+
+# Stop LVM2
+if [ -x /sbin/vgchange ] && \
+ [ -x /sbin/lvdisplay ] && \
+ [ -x /sbin/vgdisplay ] && \
+ [ -x /sbin/lvchange ] && \
+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \
+ [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
+then
+ einfo "Shutting down the Logical Volume Manager"
+ # If these commands fail it is not currently an issue
+ # as the system is going down anyway based on the current LVM
+ # functionality as described in this forum thread
+ #https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html
+
+ LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|sed -e 's/.*LV Name\s*\(.*\)/\1/'|sort`
+ VOLUME_GROUPS=`vgdisplay |grep "VG Name"|sed -e 's/.*VG Name\s*\(.*\)/\1/'|sort`
+ 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"|sed -e 's/.*Open LV\s*\(.*\)/\1/'`
+ if [ "${VG_HAS_ACTIVE_LV}" = 0 ]
+ then
+ ebegin " Shutting Down volume group: ${x} "
+ vgchange -an --ignorelockingfailure -P ${x} >/dev/null
+ eend
+ fi
+ done
+
+ for x in ${LOGICAL_VOLUMES}
+ do
+ LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|sed -e 's/.*# open\s*\(.*\)/\1/'`
+ if [ "${LV_IS_ACTIVE}" = 1 ]
+ then
+
+ ROOT_DEVICE=`mount|grep " / "|awk '{print $1}'`
+ MOUNTED_DEVICE=${x}
+ [ -L ${ROOT_DEVICE} ] && ROOT_DEVICE="`/bin/readlink ${ROOT_DEVICE}`"
+ [ -L ${x} ] && MOUNTED_DEVICE="`/bin/readlink ${x}`"
+ if [ ! ${ROOT_DEVICE} = ${MOUNTED_DEVICE} ]
+ then
+ ewarn " Unable to shutdown: ${x} "
+ fi
+ fi
+ done
+ einfo "Finished Shutting down the Logical Volume Manager"
+fi
+
+# vim:ts=4