From ddd4f78358cae718f3dde6cd8a7866a62d0495d2 Mon Sep 17 00:00:00 2001 From: Peter Volkov Date: Fri, 11 Feb 2011 22:00:55 +0000 Subject: sys-fs/ocfs2-tools: version bump, digged in attic... svn path=/; revision=471 --- sys-fs/ocfs2-tools/Manifest | 5 + sys-fs/ocfs2-tools/files/INSTALL.GENTOO | 109 +++++++++++++++++ sys-fs/ocfs2-tools/files/ocfs2.conf | 178 ++++++++++++++++++++++++++++ sys-fs/ocfs2-tools/files/ocfs2.init | 100 ++++++++++++++++ sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild | 63 ++++++++++ 5 files changed, 455 insertions(+) create mode 100644 sys-fs/ocfs2-tools/Manifest create mode 100644 sys-fs/ocfs2-tools/files/INSTALL.GENTOO create mode 100644 sys-fs/ocfs2-tools/files/ocfs2.conf create mode 100644 sys-fs/ocfs2-tools/files/ocfs2.init create mode 100644 sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild diff --git a/sys-fs/ocfs2-tools/Manifest b/sys-fs/ocfs2-tools/Manifest new file mode 100644 index 0000000..b4e1599 --- /dev/null +++ b/sys-fs/ocfs2-tools/Manifest @@ -0,0 +1,5 @@ +AUX INSTALL.GENTOO 3933 RMD160 2b6adb01de96dbd503f07a5d067ede79416e5cc1 SHA1 8d4a006c699741ab584096d603d1158a6cba3e10 SHA256 6b5962e4f1b3a463c302bb08380b4b992fdb5eb88150a803bd22b24b7df64027 +AUX ocfs2.conf 4400 RMD160 01b052775dc31f290a51940f8dec9abf4764038a SHA1 979da795b8290260f395df413e56a4b2418f36d2 SHA256 4ceb77ebda201ccf00dea66db4791848653daed601cfcf97301f5ba8b16549aa +AUX ocfs2.init 2988 RMD160 a155616b632419fc54443e45b69a248d8660520c SHA1 5b5e23fdb617f1f6ca7122588e9d832966e804df SHA256 fecbc0b8ffd12b7f354e360296a24cb35bf6dcb2bcec77ba8ec5b9028232589c +DIST ocfs2-tools-1.6.4.tar.gz 823914 RMD160 c8b65f4c26017e257c4190322d6df64e9ef7925b SHA1 1409a13f63b55457a474c5f5662260e420452ee9 SHA256 dda9db208312e3e5f4f55ee77e66e7b35b9cc10421bc02065a6c168e42b24755 +EBUILD ocfs2-tools-1.6.4.ebuild 1694 RMD160 84509e0a7c051737c71c6dfce83ec9a3297b2f00 SHA1 f4d2703a7b3692c0843e382813f747ea9818a9a9 SHA256 9652c506fe29f8aa47270db6fa203f76b7dcc1c29abac7bcdadafd0f618366f4 diff --git a/sys-fs/ocfs2-tools/files/INSTALL.GENTOO b/sys-fs/ocfs2-tools/files/INSTALL.GENTOO new file mode 100644 index 0000000..ed36a97 --- /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 -t node -a number= \ + -a ip_address= -a ip_port= -a cluster= + +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 -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/ocfs2.conf b/sys-fs/ocfs2-tools/files/ocfs2.conf new file mode 100644 index 0000000..c951737 --- /dev/null +++ b/sys-fs/ocfs2-tools/files/ocfs2.conf @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + +[gentoo-x86] Contents of /sys-fs/ocfs2-tools/files/ocfs2.conf + + + + + + + +
Gentoo
+

Contents of /sys-fs/ocfs2-tools/files/ocfs2.conf

+ +

+ +Parent Directory Parent Directory + +| Revision Log Revision Log + + + + +

+ +
+
+Revision 1.2 - +(show annotations) +(download) + + +
Thu Oct 8 09:03:35 2009 UTC +(16 months ago) +by flameeyes + + +
Branch: MAIN + + +
CVS Tags: HEAD + + + + +
Changes since 1.1: +1 -1 lines + + + +
File MIME type: text/plain + + + + + + +
FILE REMOVED + + +
Remove packages slated for QA removal today.
+
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1# Copyright 1999-2006 Gentoo Foundation +
2# Distributed under the terms of the GNU General Public License v2 +
3# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/files/Attic/ocfs2.conf,v 1.2 2009/10/08 09:03:35 flameeyes dead $ +
4 +
5# Put your cluster names here, separated by space, ie. +
6# OCFS2_CLUSTER="cluster1 admincluster cluster2" +
+
+ + + + + +
+ + + + + + + + + +
 ViewVC Help
Powered by ViewVC 1.1.8 
+ + + diff --git a/sys-fs/ocfs2-tools/files/ocfs2.init b/sys-fs/ocfs2-tools/files/ocfs2.init new file mode 100644 index 0000000..32abd47 --- /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/Attic/ocfs2.init,v 1.2 2009/10/08 09:03:35 flameeyes dead $ + +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-/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-/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/ocfs2-tools-1.6.4.ebuild b/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild new file mode 100644 index 0000000..f80ce8b --- /dev/null +++ b/sys-fs/ocfs2-tools/ocfs2-tools-1.6.4.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/Attic/ocfs2-tools-1.2.1.ebuild,v 1.5 2009/10/08 09:03:35 flameeyes dead $ + +EAPI="3" +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="~amd64 ~x86" +IUSE="X" + +# (#142216) build system's broke, always requires glib for debugfs utility +RDEPEND=" + X? ( + x11-libs/gtk+:2 + >=dev-lang/python-2 + >=dev-python/pygtk-2 + ) + sys-apps/util-linux + >=dev-libs/glib-2.2.3 + sys-fs/e2fsprogs" +DEPEND="${RDEPEND}" + +src_configure() { + econf \ + $(use_enable X ocfs2console) \ + --enable-dynamic-fsck \ + --enable-dynamic-ctl +} + +src_install() { + make DESTDIR="${D}" install || die "Failed to install" + + dodoc CREDITS MAINTAINERS README.O2CB debugfs.ocfs2/README \ + documentation/{{users_guide,ocfs2_faq}.txt,/samples/cluster.conf} \ + "${FILESDIR}"/INSTALL.GENTOO + + # Keep o2cb script in case someone needs it + insinto /usr/sbin + newins vendor/common/o2cb.init o2cb + insinto /etc/default + newins vendor/common/o2cb.sysconfig o2cb + + newinitd "${FILESDIR}"/ocfs2.init ocfs2 + newconfd "${FILESDIR}"/ocfs2.conf ocfs2 + + insinto /etc/ocfs2 + newins documentation/samples/cluster.conf cluster.conf + +# keepdir /config +# keepdir /dlm +} + +pkg_postinst() { + elog "Read INSTALL.GENTOO in /share/doc/${PF}/ for instructions" + elog "about how to install, configure and run ocfs2." +} -- cgit v1.2.3-65-gdbad