summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2006-07-20 05:13:14 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2006-07-20 05:13:14 +0000
commit6f454c659720fc19837059230607a12e4b7ecd62 (patch)
treefbeddf40100be9eda22e45470e79130e583d522d /sys-fs
parentVersion bump #140950 by riskable. (diff)
downloadgentoo-2-6f454c659720fc19837059230607a12e4b7ecd62.tar.gz
gentoo-2-6f454c659720fc19837059230607a12e4b7ecd62.tar.bz2
gentoo-2-6f454c659720fc19837059230607a12e4b7ecd62.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.
(Portage version: 2.1.1_pre3)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/ocfs2-tools/ChangeLog13
-rw-r--r--sys-fs/ocfs2-tools/Manifest28
-rw-r--r--sys-fs/ocfs2-tools/files/INSTALL.GENTOO109
-rw-r--r--sys-fs/ocfs2-tools/files/digest-ocfs2-tools-1.2.13
-rw-r--r--sys-fs/ocfs2-tools/files/ocfs2.conf6
-rw-r--r--sys-fs/ocfs2-tools/files/ocfs2.init100
-rw-r--r--sys-fs/ocfs2-tools/metadata.xml5
-rw-r--r--sys-fs/ocfs2-tools/ocfs2-tools-1.2.1.ebuild77
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..108e59bb5eea
--- /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 226 RMD160 6538bd4b24a3cb34c474b44a41fe2ca788a056c7 SHA1 fa95880f987606fe1dac75ee607f960c0e8b6199 SHA256 e58061cbaba432e1e060abe51fc6c714c899face0f32a27342dfeca675230bca
+MD5 29ed5b7c192c4f4883f920680dfbdd9f files/ocfs2.conf 226
+RMD160 6538bd4b24a3cb34c474b44a41fe2ca788a056c7 files/ocfs2.conf 226
+SHA256 e58061cbaba432e1e060abe51fc6c714c899face0f32a27342dfeca675230bca files/ocfs2.conf 226
+AUX ocfs2.init 2881 RMD160 49d828f2fa88de83e00869877491079167bd4c98 SHA1 b429991c27d372911165097d09b9749b3c0fe03f SHA256 7074cb4ea15383e9471b7963f02084753130902b2f29c9c2a163db3f21020bd1
+MD5 5d7a1b2f1932356b1a69f0afb799de6a files/ocfs2.init 2881
+RMD160 49d828f2fa88de83e00869877491079167bd4c98 files/ocfs2.init 2881
+SHA256 7074cb4ea15383e9471b7963f02084753130902b2f29c9c2a163db3f21020bd1 files/ocfs2.init 2881
+DIST ocfs2-tools-1.2.1.tar.gz 436783 RMD160 496ade1c11f507ed1e8fdfc8cd0e446f735e8b25 SHA1 3b6b9b40cfe1d441b52774776ac0a80bcbe401a9 SHA256 a53354357352eadb9efad33590c262d6a0e00ec5fb7d2248354de83719b113e9
+EBUILD ocfs2-tools-1.2.1.ebuild 2075 RMD160 8d7edec8180114296f0bc6db0145886999d0cb82 SHA1 5f0f5df08a919375a76e9f2db78098a6de00444c SHA256 c953fa95b3f5e22232a305be74d471d2e9180c9c0f5a174ba678e2e5544be027
+MD5 e2b2d98c686853f0c17b567d72c4ed7f ocfs2-tools-1.2.1.ebuild 2075
+RMD160 8d7edec8180114296f0bc6db0145886999d0cb82 ocfs2-tools-1.2.1.ebuild 2075
+SHA256 c953fa95b3f5e22232a305be74d471d2e9180c9c0f5a174ba678e2e5544be027 ocfs2-tools-1.2.1.ebuild 2075
+MISC ChangeLog 538 RMD160 2b76f247b3513e1c39ab4d2cf44761977ca20cf8 SHA1 71e316b58fa6b456f290e176c19f5ce166115cfb SHA256 1c53858b1d1ee27a41e86d5f19c9178481eeec61ae8c63933abd75467ddfe919
+MD5 379dc959a1df4b3b932cacfd1c01b2b4 ChangeLog 538
+RMD160 2b76f247b3513e1c39ab4d2cf44761977ca20cf8 ChangeLog 538
+SHA256 1c53858b1d1ee27a41e86d5f19c9178481eeec61ae8c63933abd75467ddfe919 ChangeLog 538
+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."
+}