diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2006-07-20 05:13:14 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2006-07-20 05:13:14 +0000 |
commit | 157e5225ed2ca905da57ad530446d74d738fe89d (patch) | |
tree | 21c0e1e158d1f23b5b967d09e600cb82d62f6f33 /sys-fs | |
parent | Version bump #140950 by riskable. (diff) | |
download | historical-157e5225ed2ca905da57ad530446d74d738fe89d.tar.gz historical-157e5225ed2ca905da57ad530446d74d738fe89d.tar.bz2 historical-157e5225ed2ca905da57ad530446d74d738fe89d.zip |
(#98024) Add userland tools for the OCFS2 clustering filesystem. Ebuild and related files written by Mauricio Zambrano, Lazar Obradovic and others. I've fixed up some grammer and the ebuild for addition to the tree.
Package-Manager: portage-2.1.1_pre3
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/ocfs2-tools/ChangeLog | 13 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/Manifest | 28 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/files/INSTALL.GENTOO | 109 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/files/digest-ocfs2-tools-1.2.1 | 3 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/files/ocfs2.conf | 6 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/files/ocfs2.init | 100 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/metadata.xml | 5 | ||||
-rw-r--r-- | sys-fs/ocfs2-tools/ocfs2-tools-1.2.1.ebuild | 77 |
8 files changed, 341 insertions, 0 deletions
diff --git a/sys-fs/ocfs2-tools/ChangeLog b/sys-fs/ocfs2-tools/ChangeLog new file mode 100644 index 000000000000..c4f6610d23b6 --- /dev/null +++ b/sys-fs/ocfs2-tools/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for sys-fs/ocfs2-tools +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/ChangeLog,v 1.1 2006/07/20 05:13:14 dberkholz Exp $ + +*ocfs2-tools-1.2.1 (20 Jul 2006) + + 20 Jul 2006; Donnie Berkholz <dberkholz@gentoo.org>; + +files/INSTALL.GENTOO, +files/ocfs2.conf, +files/ocfs2.init, + +metadata.xml, +ocfs2-tools-1.2.1.ebuild: + (#98024) Add userland tools for the OCFS2 clustering filesystem. Ebuild and + related files written by Mauricio Zambrano, Lazar Obradovic and others. I've + fixed up some grammer and the ebuild for addition to the tree. + diff --git a/sys-fs/ocfs2-tools/Manifest b/sys-fs/ocfs2-tools/Manifest new file mode 100644 index 000000000000..1a20071e9bf6 --- /dev/null +++ b/sys-fs/ocfs2-tools/Manifest @@ -0,0 +1,28 @@ +AUX INSTALL.GENTOO 3933 RMD160 2b6adb01de96dbd503f07a5d067ede79416e5cc1 SHA1 8d4a006c699741ab584096d603d1158a6cba3e10 SHA256 6b5962e4f1b3a463c302bb08380b4b992fdb5eb88150a803bd22b24b7df64027 +MD5 a23e036d66166c83ed2f13032999e652 files/INSTALL.GENTOO 3933 +RMD160 2b6adb01de96dbd503f07a5d067ede79416e5cc1 files/INSTALL.GENTOO 3933 +SHA256 6b5962e4f1b3a463c302bb08380b4b992fdb5eb88150a803bd22b24b7df64027 files/INSTALL.GENTOO 3933 +AUX ocfs2.conf 326 RMD160 32ec5fb5d4c4e908bfe8ea29b7083639b23515a3 SHA1 c29ce2c5823aa0658fe613286e398a3596ff447b SHA256 353cd1144b2d0c6145aa287137f7c5cb211e7949a8c691fec0815906ca2dc09b +MD5 3738e931e2e7e6ce14cb7dbc85dd2f05 files/ocfs2.conf 326 +RMD160 32ec5fb5d4c4e908bfe8ea29b7083639b23515a3 files/ocfs2.conf 326 +SHA256 353cd1144b2d0c6145aa287137f7c5cb211e7949a8c691fec0815906ca2dc09b files/ocfs2.conf 326 +AUX ocfs2.init 2981 RMD160 72ad1d43c29f1e7d59b2c4b56c3f89c70bae2f50 SHA1 5cd7964188e1f91664fb0959bf1f7177aee9bdc4 SHA256 00fc34b67e9d193819ca78abd8e74458eda1aaa322d259362f7f191ae6fcdd70 +MD5 abbe10d054f94a7a33ebe1b9b41cf5c2 files/ocfs2.init 2981 +RMD160 72ad1d43c29f1e7d59b2c4b56c3f89c70bae2f50 files/ocfs2.init 2981 +SHA256 00fc34b67e9d193819ca78abd8e74458eda1aaa322d259362f7f191ae6fcdd70 files/ocfs2.init 2981 +DIST ocfs2-tools-1.2.1.tar.gz 436783 RMD160 496ade1c11f507ed1e8fdfc8cd0e446f735e8b25 SHA1 3b6b9b40cfe1d441b52774776ac0a80bcbe401a9 SHA256 a53354357352eadb9efad33590c262d6a0e00ec5fb7d2248354de83719b113e9 +EBUILD ocfs2-tools-1.2.1.ebuild 2183 RMD160 92b83aaffbb1cbfb7efcbe88f06efc6ad30b8f16 SHA1 2e4cf18764161ecdd52aee03f8fd0428c0bf0c2e SHA256 e47bfdcba5904760a6a35cded94f65e01dd300ef779b8748207e048b14bc24d3 +MD5 ffc246611d79d6e6b67586d984c4ec24 ocfs2-tools-1.2.1.ebuild 2183 +RMD160 92b83aaffbb1cbfb7efcbe88f06efc6ad30b8f16 ocfs2-tools-1.2.1.ebuild 2183 +SHA256 e47bfdcba5904760a6a35cded94f65e01dd300ef779b8748207e048b14bc24d3 ocfs2-tools-1.2.1.ebuild 2183 +MISC ChangeLog 631 RMD160 ab9be598b6748d2a63ccd0c59b66d386780f0c60 SHA1 0e4522d03cc9ef81f303fbe0b24af6be7437d2ac SHA256 0b5767f6e5e25aaaf6d5970514076f31577b2358c32995718ddec4a7b52ebbc7 +MD5 1010416b90aa5a588a23542fca984913 ChangeLog 631 +RMD160 ab9be598b6748d2a63ccd0c59b66d386780f0c60 ChangeLog 631 +SHA256 0b5767f6e5e25aaaf6d5970514076f31577b2358c32995718ddec4a7b52ebbc7 ChangeLog 631 +MISC metadata.xml 160 RMD160 1233ca29861ca7c47f0b09d1d7a29def80f7df02 SHA1 1bfdc9d282a84c95e2bdcda19ace5b94e2e67349 SHA256 56717bdb03ad5d833acecfbc612a67f569256b328bf610fbc6cc33714186dae9 +MD5 cde8b4e93c9339eb99fe3ad45941c99b metadata.xml 160 +RMD160 1233ca29861ca7c47f0b09d1d7a29def80f7df02 metadata.xml 160 +SHA256 56717bdb03ad5d833acecfbc612a67f569256b328bf610fbc6cc33714186dae9 metadata.xml 160 +MD5 b3a740e3190e7ef647cc9a7d4bbf8fb7 files/digest-ocfs2-tools-1.2.1 253 +RMD160 19ae09e483f217da3a01ba39b6a111bebee462b7 files/digest-ocfs2-tools-1.2.1 253 +SHA256 5863ff04d35586f8e36f53e745d1e538b2540f4b2778b59de0128f1891b8ca61 files/digest-ocfs2-tools-1.2.1 253 diff --git a/sys-fs/ocfs2-tools/files/INSTALL.GENTOO b/sys-fs/ocfs2-tools/files/INSTALL.GENTOO new file mode 100644 index 000000000000..ed36a97be281 --- /dev/null +++ b/sys-fs/ocfs2-tools/files/INSTALL.GENTOO @@ -0,0 +1,109 @@ +Installing, configuring and running OCFS2 on Gentoo Linux + + +INSTALLING +========== +Step 1 - Inserting modules +-------------------------- +Add 'ocfs2' to your /etc/modules.autoload.d/kernel-2.6 file: +# echo "ocfs2" >> /etc/modules.autoload.d/kernel-2.6 +# modules-update + +Step 2 - Mounting the pseudo-filesystems +---------------------------------------- +add mountpoints for configfs and dlmfs to /etc/fstab +# echo "none /config configfs defaults 0 0" >> /etc/fstab +# echo "none /dlm ocfs2_dlmfs defaults 0 0" >> /etc/fstab + +Step 3 - Adding ocfs to list of network filesystems +--------------------------------------------------- +Edit /etc/init.d/functions.sh and add "ocfs2" to a NET_FS_LIST list. +This way localmount will not mount ocfs2 filesystems before running net.ethX +and ocfs2 init scripts. This *IS* dirty, but sys-apps/baselayout needs to be +updated. + +Step 4 - Addding ocfs2 to default runlevel +------------------------------------------ +# rc-update add ocfs2 default + + +CONFIGURING +=========== +Step 1 - Edit your cluster.conf +------------------------------- +Edit /etc/ocfs2/cluster.conf and add your nodes. One node can be a member +of many cluster, so repeat the config for each node/cluster pair. In the case of +a multicluster node, "ip_port" must be different for every cluster. +You can also use o2cb_console for this task, if you compiled with USE=X. + +Step 2 - Copy config to other nodes +----------------------------------- +Make sure that every node in cluster(s) has an identical config file. + +Step 3 - Update /etc/conf.d/ocfs2 +--------------------------------- +Add names of cluster(s) in which this node belongs to the OCFS2_CLUSTERS list. + +Also, if you're running firewall on your nodes, make sure you've read +"Firewall restrictions" below. + +RUNNING +======= + +Notes about adding nodes while online +------------------------- +*DON'T* add nodes to /etc/ocfs2/cluster.conf while the cluster is online. +Use /sbin/o2cb_ctl instead, e.g.: + +# /sbin/o2cb_ctl -C -n <node_name> -t node -a number=<node_number> \ + -a ip_address=<ip_address> -a ip_port=<port> -a cluster=<clustername> + +If the complete cluster is down, you may add nodes to /etc/ocfs2/cluster.conf, +but make sure you end up with *SAME* cluster.conf on every node. + +For a complete reference, check files in this directory +as well as http://oss.oracle.com/projects/ocfs2 +You have been warned. + +Also, if you're running a firewall on your nodes, make sure you've read the +following section. + +Firewall restrictions +--------------------- +Logically, allow all nodes to connect to each other via specified port(s). +If you used 7777 as a port for communication, issue: + +# iptables -I INPUT 1 -m state --state ESTABLISHED,RELATED -j ACCEPT +# iptables -N OCFS2_NODES +# iptables -A OCFS2_NODES -s <node_ip_address> -j ACCEPT +(repeat former command for every node) +# iptables -A OCFS2_NODES -j DROP +# iptables -A INPUT -p tcp --dport 7777 -m state --state NEW -j OCFS2_NODES +# /etc/init.d/iptables save + +You should do this on every node. + +KNOWN BUGS +========== +1. Init script does not have all the funtionality of the o2cb script +---------------------------------------------------------------- +I know that, but o2cb script doesn't use "depend" and therefore its start +can't be controlled inside runlevels. I had to rewrite major portions of it +to make it Gentoo-friendly. o2cb is still available, and if you need +additional functionality from /etc/init.d/ocfs2, file a bug report (see +"Reporting Bugs" below). + +2. Booting off the ocfs2 cluster doesn't work +--------------------------------------------- +... or at least, isn't tested. If someone wants to play with it, I'd be +happy to incorporate any ideas or experiences. + +REPORTING BUGS +============== +Open a bug at http://bugs.gentoo.org and add laza@yu.net into the CC list. +If the problem is within my powers, I'll fix it, if not, I'll +escalate it to ocfs2 developers. + +--- +05. Aug 2005. +Lazar Obradovic diff --git a/sys-fs/ocfs2-tools/files/digest-ocfs2-tools-1.2.1 b/sys-fs/ocfs2-tools/files/digest-ocfs2-tools-1.2.1 new file mode 100644 index 000000000000..7aeb5b2d7c7a --- /dev/null +++ b/sys-fs/ocfs2-tools/files/digest-ocfs2-tools-1.2.1 @@ -0,0 +1,3 @@ +MD5 62c24ae0f3016eb5c15f0dfc90fe956a ocfs2-tools-1.2.1.tar.gz 436783 +RMD160 496ade1c11f507ed1e8fdfc8cd0e446f735e8b25 ocfs2-tools-1.2.1.tar.gz 436783 +SHA256 a53354357352eadb9efad33590c262d6a0e00ec5fb7d2248354de83719b113e9 ocfs2-tools-1.2.1.tar.gz 436783 diff --git a/sys-fs/ocfs2-tools/files/ocfs2.conf b/sys-fs/ocfs2-tools/files/ocfs2.conf new file mode 100644 index 000000000000..c385e8041be7 --- /dev/null +++ b/sys-fs/ocfs2-tools/files/ocfs2.conf @@ -0,0 +1,6 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/files/ocfs2.conf,v 1.1 2006/07/20 05:13:14 dberkholz Exp $ + +# Put your cluster names here, separated by space, ie. +# OCFS2_CLUSTER="cluster1 admincluster cluster2" diff --git a/sys-fs/ocfs2-tools/files/ocfs2.init b/sys-fs/ocfs2-tools/files/ocfs2.init new file mode 100644 index 000000000000..dde6540a336a --- /dev/null +++ b/sys-fs/ocfs2-tools/files/ocfs2.init @@ -0,0 +1,100 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/files/ocfs2.init,v 1.1 2006/07/20 05:13:14 dberkholz Exp $ + +depend() { + need net localmount + before netmount +} + +check_modules() { + local MODULES="ocfs2_dlmfs ocfs2 ocfs2_dlm ocfs2_nodemanager configfs" + local MODULE + local MODPROBE="modprobe -l" + local retval=0 + + for MODULE in ${MODULES}; do + if [ -z "`${MODPROBE} ${MODULE}`" ] ; then + retval=1 + fi + done + if [ ${retval} -eq 1 ] ; then + ewarn "One or more required modules are not loaded." + ewarn "Make sure you have " + ewarn " - placed ocfs, dlmfs and configfs into /etc/modules.autoload.d/kernel-2.6" + ewarn "For a (in)complete documentation, read /usr/share/doc/ocfs-<version>/INSTALL.GENTOO.gz" + fi + return ${retval} +} + +check_pseudofs() { + local retval=0 + local HASMOUNT="mount -l -t" + if [ -z "`${HASMOUNT} configfs`" ] ; then + retval=1 + fi + if [ -z "`${HASMOUNT} ocfs2_dlmfs`" ] ; then + retval=1 + fi + + if [ ${retval} -eq 1 ]; then + ewarn "One or more pseudo-filesystes are not mounted." + ewarn "Make sure you have following lines in your /etc/fstab:" + ewarn "none /config configfs defaults 0 0" + ewarn "none /dlm ocfs2_dlmfs defaults 0 0" + ewarn "For a (in)complete documentation, read /usr/share/doc/ocfs-<version>/INSTALL.GENTOO.gz" + fi + return ${retval} +} + + + +start() { + check_modules || return $? + check_pseudofs || return $? + + einfo "Starting OCFS2 cluster" + for cluster in ${OCFS2_CLUSTER}; do + ebegin " - ${cluster}" + /sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=yes >/dev/null 2>&1 + eend $? + done +} + +stop() { + # Shamelesly stolen from netmount + local ret + ebegin "Unmounting OCFS2 filesystems" + [ -z "$(umount -art ocfs2 2>&1)" ] + ret=$? + eend ${ret} "Failed to simply unmount filesystems" + [ ${ret} -eq 0 ] && return 0 + + declare -a siglist=( "TERM" "KILL" "KILL" ) + local retry=0 + local remaining="go" + + while [ -n "${remaining}" -a ${retry} -lt 3 ] + do + remaining="$(awk '$3 ~ /'ocfs2'/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)" + IFS=$'\n' + set -- ${remaining//\\040/ } + unset IFS + [ -z "${remaining}" ] && break + + ebegin $'\t'"Unmounting ocfs2 filesystems (retry #$((retry+1)))" + /bin/fuser -k -${siglist[$((retry++))]} -m "$@" &>/dev/null + sleep 5 + umount "$@" &>/dev/null + eend $? $'\t'"Failed to unmount filesystems" + done + + + einfo "Stopping OCFS2 cluster" + for cluster in ${OCFS_CLUSTERS}; do + ebegin " - ${cluster}" + /sbin/o2cb_ctl -H -n ${cluster} -t cluster -a online=no >/dev/null 2>&1 + eend $? + done +} diff --git a/sys-fs/ocfs2-tools/metadata.xml b/sys-fs/ocfs2-tools/metadata.xml new file mode 100644 index 000000000000..348e6c4de815 --- /dev/null +++ b/sys-fs/ocfs2-tools/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cluster</herd> +</pkgmetadata> diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.2.1.ebuild b/sys-fs/ocfs2-tools/ocfs2-tools-1.2.1.ebuild new file mode 100644 index 000000000000..644120d02aa1 --- /dev/null +++ b/sys-fs/ocfs2-tools/ocfs2-tools-1.2.1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/ocfs2-tools-1.2.1.ebuild,v 1.1 2006/07/20 05:13:14 dberkholz Exp $ + +PV_MAJOR="${PV%%.*}" +PV_MINOR="${PV#*.}" +PV_MINOR="${PV_MINOR%%.*}" +DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2" +HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/" +SRC_URI="http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v${PV_MAJOR}.${PV_MINOR}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="X" +RDEPEND="X? ( + >=dev-libs/glib-2.2.3 + =x11-libs/gtk+-2* + >=dev-lang/python-2 + >=dev-python/pygtk-2 + ) + sys-fs/e2fsprogs" +DEPEND="${RDEPEND}" + +src_compile() { + local myconf="--enable-dynamic-fsck --enable-dynamic-ctl" + + econf --prefix=${ROOT} \ + $(use_enable X ocfs2console) \ + ${myconf} \ + || die "Failed to configure" + + emake -j1 || die "Failed to compile" +} + +src_install() { + make DESTDIR="${D}" install || die "Failed to install" + + doman \ + mkfs.ocfs2/mkfs.ocfs2.8 \ + ocfs2cdsl/ocfs2cdsl.8 \ + ocfs2console/ocfs2console.8 \ + ocfs2_hb_ctl/ocfs2_hb_ctl.8 \ + tunefs.ocfs2/tunefs.ocfs2.8 + dodoc \ + COPYING CREDITS MAINTAINERS README README.O2CB debugfs.ocfs2/README \ + documentation/users_guide.txt documentation/samples/cluster.conf \ + "${FILESDIR}"/INSTALL.GENTOO + + # Keep o2cb script in case someone needs it + insinto /usr/sbin + newins "${S}"/vendor/common/o2cb.init o2cb + insinto /etc/default + newins "${S}"/vendor/common/o2cb.sysconfig o2cb + + # Move programs not needed before /usr is mounted to /usr/sbin/ + mv "${D}"/sbin/ocfs2cdsl "${D}"/usr/sbin/ + mv "${D}"/sbin/ocfs2console "${D}"/usr/sbin/ + + newinitd "${FILESDIR}"/ocfs2.init ocfs2 + newconfd "${FILESDIR}"/ocfs2.conf ocfs2 + + insinto /etc/ocfs2 + newins "${S}"/documentation/samples/cluster.conf cluster.conf + + keepdir /config + keepdir /dlm + + # FIXME - fix the python lib. + # pythonians wouldn't like this probably, but I couldn't find better + # solution. + mv "${D}"/lib "${D}"/usr +} + +pkg_postinst() { + elog "Read ${ROOT}usr/share/doc/${P}/INSTALL.GENTOO.gz for instructions" + elog "about how to install, configure and run ocfs2." +} |