--- aoetools-26.orig/aoe-mkdevs +++ aoetools-26/aoe-mkdevs @@ -56,6 +56,6 @@ mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'` i=0 while test $i -lt $n_shelves; do - sh $mkshelf $dir $i + $mkshelf $dir $i i=`expr $i + 1` done --- aoetools-26.orig/aoe-flush.in +++ aoetools-26/aoe-flush.in @@ -19,7 +19,7 @@ # make sure that each device in the whitespace-separated # list exists -function verify_devs () { +verify_devs () { err="" for d; do aoe-stat | --- aoetools-26.orig/debian/compat +++ aoetools-26/debian/compat @@ -0,0 +1 @@ +4 --- aoetools-26.orig/debian/README +++ aoetools-26/debian/README @@ -0,0 +1,32 @@ +aoetools for Debian +------------------- + +With aoetools it is shipped an init script that will mount any AoE volume +properly configured in your /etc/fstab, that is, without option 'noauto' +AND with an option '_netdev', if you want to avoid any error messages in +the boot process. In the following examples I am supposing that the rest +of the mount options are simply 'defaults', but you can replace it with +other parameters. + +Example of a correct line: + +/dev/etherd/e0.0p5 /mnt/aoe xfs defaults,_netdev 2 0 + + +Wrong examples: + +This line will generate boot errors, as the early mount process will try to mount this +volume, because it is not marked as network-dependant: + +/dev/etherd/e0.0p5 /mnt/aoe xfs defaults 2 0 + + +This line will provoke that the /mnt/aoe volume won't simply get mounted while booting +or running "/etc/init.d/aoetools start": + +/dev/etherd/e0.0p5 /mnt/aoe xfs defaults,noauto 2 0 + + +Important note: Please note that if your network is not properly configured or your +AoE server is down, you can incur in big delays in the booting process. If you fear so, +mount volumes manually after you are sure that your AoE shelf is reachable. --- aoetools-26.orig/debian/changelog +++ aoetools-26/debian/changelog @@ -0,0 +1,129 @@ +aoetools (26-1) unstable; urgency=low + + * New upstream release (closes: #475135). Main changes are: + - Merged Debian changes for Makefile. + - Add sos-linux tool for collecting localhost information (not shipped). + - Create coraid-update for uploading update file to an update target. + - Make aoeping and aoecfg more conforming to AoE protocol. + - Support new payload size information from AoE driver. + - Handle aoe-flush without arguments correctly. + - Aoe-flush: support flushing specific devices. + - Fixed and added several manpages. + * debian/aoetools.docs: Removed TODO. + * aoe-flush.in: Patched to comply with dash-compliant shells. + * debian/control: + - Added a Homepage field. + - Bumped Standards-Version to 3.8.0. + - Reordered utilities in Description and added coraid-update. + + -- David Martínez Moreno Thu, 03 Jul 2008 16:40:06 +0200 + +aoetools (21-1) unstable; urgency=low + + * New upstream release. Main changes are: + - Merged Debian modifications for solving bashisms. + - Now the tools are udev-aware. + - Added aoe-version tool for getting AoE-related software information. + - Added aoecfg tool, a full implementation of the config query feature of + the AoE protocol. + - Added some additional manpages and clarified copyright. + - Enhanced aoeping. + * debian/copyright: Added some information for making clear that Coraid is + the real copyright holder. + * debian/control: Added aoe-flush, aoe-version and aoecfg to the + description. + * Makefile: Added AOE_CFG_OBJ to the clean target. + + -- David Martínez Moreno Mon, 10 Dec 2007 03:41:22 +0100 + +aoetools (15-1) unstable; urgency=low + + * New upstream release: + - Man pages improved. + - Missing device nodes trigger an error in the scripts now. + - aoe-flush command added, for removing devices in driver memory. + - Support aoe devices without "etherd" prefix in name. + - Add support for -c flag to aoe-interfaces. + - Some Debian changes merged. + * debian/aoetools.init: + - Change Provides: in the LSB header from 'mountaoe' to 'aoe'. + - Add a comment about the loading of the aoe module. + - Rearranged logic a bit, in order to postpone module load until we have a + valid interface list. This has the added value of resolving (again) the + installation in a new system. + - Sleep 1 second before checking for /dev/etherd/discover, to give udev a + chance to create the files. + - Merged most of the modifications to the init script, kindly contributed + by Glen W. Mabey. I added robustness and fixed some old errors while at + it. This closes: #421554, #408044, #387552 (finally). + * debian/aoetools.default: Added support for LVMGROUPS and AOEMOUNTS. + * debian/rules: Added support for creating rc0.d/S34aoetools and + rc6.d/S34aoetools. + * debian/copyright: Point to GPL-2 instead of GPL. + + -- David Martínez Moreno Tue, 04 Sep 2007 03:24:19 +0200 + +aoetools (11-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Apply patch from Nelson A. de Oliveira to fix missing dependency on + lsb-base (closes: #403294) + + -- Andrew Pollock Sat, 16 Dec 2006 10:37:05 -0800 + +aoetools (11-1.1) unstable; urgency=high + + * Non-maintainer upload. + * Have the init script opportunistically modprobe aoe, and exit out + if $INTERFACES == none before checking for /dev/etherd, so that the + PACKAGE installs cleanly on unconfigured systems; patch from + Steve Langasek. (Closes: #391345) + + -- Steinar H. Gunderson Tue, 31 Oct 2006 14:25:41 +0100 + +aoetools (11-1) unstable; urgency=low + + * New upstream release: + - Use POSIX shell math instead of relying on bc or dc (closes: #377431). + * The introduced changes, as is, do not work with discs bigger than 2 GB. + The problem is that POSIX arithmetic is limited to 2147483648, but not in + bash. Probably upstream author (and Warren Turkal) have /bin/sh pointing + to /bin/bash, so he (they) did not see the problem. Changed all the + scripts using bashisms to use /bin/bash. + * debian/rules: Binaries should go to /sbin instead to /usr/sbin. If not, + we are preventing users from using AoE volumes in the early boot process, + as well as for hosting the /usr directory. Many thanks to Warren Turkal + for pointing out this (closes: #388335). + * debian/control: + - Added aoe-revalidate to the list of included tools. + - Bumped policy version to 3.7.2.1. + * Added /etc/default/aoetools and /etc/init.d/aoetools in order to + initialize AoE devices just after network goes up (position 41 in runlevel + S). Added a README-Debian about this subject. This closes: #387552. + + -- David Martínez Moreno Tue, 3 Oct 2006 03:51:32 +0200 + +aoetools (10-1) unstable; urgency=low + + * New upstream release. This fixes device creation, so closes: #337300. + * debian/control: + - Bump Standards-Version to 3.7.2.0. + - Bump dependency on debhelper to >= 5. + - Rewrote the package description. + * debian/compat: Bumped compatibility to 5. + * debian/copyright: Changed FSF's address to the new one. + * Added devnodes.txt to shipped docs. + + -- David Martínez Moreno Tue, 30 May 2006 04:13:47 +0200 + +aoetools (4-1) unstable; urgency=low + + * New upstream release. Makefile typo merged upstream, and added TODO file. + + -- David Martínez Moreno Thu, 16 Jun 2005 17:06:26 +0200 + +aoetools (3-1) unstable; urgency=low + + * First package release. + + -- David Martínez Moreno Sat, 23 Apr 2005 03:47:02 +0200 --- aoetools-26.orig/debian/aoetools.init +++ aoetools-26/debian/aoetools.init @@ -0,0 +1,178 @@ +#! /bin/sh +# +# Based on a example file to build /etc/init.d/ scripts, +# written by Miquel van Smoorenburg +# and later modified by Ian Murdock . +# +# Also based on init script mountnfs.sh from initscripts package. +# +# Modified for aoetools by David Martínez Moreno . +# Copyright 2006-2007. Under GPLv2. +# +# Support for LVM and other mount points contributed by Glen W. Mabey. +# +### BEGIN INIT INFO +# Provides: aoe +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Should-Start: +# Default-Start: S +# Default-Stop: 0 6 +# Short-Description: Begin AoE discovery and mount related filesystems. +# Description: Begin AoE discovery and mount filesystems residing +# on AoE volumes. +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=aoetools +DESC="AoE devices discovery and mounting AoE filesystems" + +[ -f /etc/default/rcS ] && . /etc/default/rcS +. /lib/lsb/init-functions + +# Include aoetools defaults if available +if [ -f /etc/default/aoetools ] ; then + . /etc/default/aoetools +fi + +set -e + +create_fs_list() { + # We start with a list from /etc/default/aoetools. + waitaoe="$AOEMOUNTS" + + [ -f /etc/fstab ] || return + # + # Read through fstab line by line. If it contains /dev/etherd, set the flag + # for mounting file systems over AoE. + # + + exec 9<&0 /dev/null 2>&1 || true + + # Also, if udev is being used, the /dev/etherd devices + # are not created until aoe module insertion, so... + sleep 1 # ...we give udev a chance to populate /dev/etherd/. + + if [ ! -c /dev/etherd/discover ] + then + echo + echo "Missing devices under /dev/etherd/. Please run" >&2 + echo " aoe-mkdevs /dev/etherd" >&2 + echo "and try again." >&2 + exit 1 + fi + + # Try to set up interfaces for discovery, if any. + if [ -n "$INTERFACES" ] + then + aoe-interfaces $INTERFACES + fi + + aoe-discover + + create_fs_list + + if [ -n "$waitaoe" ] + then + echo + fi + + if [ ! -x "/sbin/vgchange" -a -n "$LVMGROUPS" ] + then + echo + echo "The LVM2 tools are not present. Please install lvm2 package and try again." >&2 + echo "We will not honour LVMGROUPS." >&2 + LMVGROUPS="" + fi + + if [ -n "$LVMGROUPS" ] + then + for vg in "$LVMGROUPS"; do + vgchange --available=y $vg + done + fi + + if [ -n "$waitaoe" ] + then + for mountpt in $waitaoe; do + echo "Mounting $mountpt..." + mount $mountpt + #log_action_begin_msg "Waiting for $mountpt." + done + fi +} + +do_stop() { + create_fs_list + + if [ -n "$waitaoe" ] + then + for mountpt in $waitaoe; do + echo "Unmounting $mountpt..." + umount $mountpt + done + fi + + if [ -n "$LVMGROUPS" ] + then + for vg in "$LVMGROUPS"; do + vgchange --available=n $vg + done + fi + + # Removing the module prevents LVM's "Shutting down LVM Volume Groups..." + # from hanging when an LVM has been setup on a device in /dev/etherd/. + modprobe --remove aoe >/dev/null 2>&1 || true +} + +case "$1" in + start|restart|reload|force-reload) + echo -n "Starting $DESC: " + + do_start + + ;; + stop) + echo -n "Stopping $DESC: " + + do_stop + + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- aoetools-26.orig/debian/aoetools.default +++ aoetools-26/debian/aoetools.default @@ -0,0 +1,17 @@ +# Configuration file for aoetools. + +# Enter the list of network interfaces to restrict the AoE discovery to, separated by spaces. +# It can be blank, i.e. "". +# If you do not want AoE discovery at all, enter "none" as the list of interfaces. +# +# If neither the aoe_iflist module load option nor this list of interfaces are used, the aoe driver +# will use any network interface for AoE traffic. +INTERFACES="none" + +# Enter a list of LVM2 volume groups to be activated after AoE volumes are ready, separated by spaces. +# It can be blank, i.e., "". +LVMGROUPS="" + +# Enter a list of file systems to be mounted over AoE. Note that those entries listed in /etc/fstab +# that contain "/dev/etherd/" will be automatically added to this list. +AOEMOUNTS="" --- aoetools-26.orig/debian/rules +++ aoetools-26/debian/rules @@ -0,0 +1,38 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + $(MAKE) + touch build-stamp + +binary-arch: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdocs + dh_installchangelogs + $(MAKE) install PREFIX=debian/aoetools SBINDIR=debian/aoetools/sbin + dh_installinit -u"start 41 S . start 34 0 6 ." + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + # do nothing + +binary: binary-arch binary-indep + +clean: + dh_testdir + dh_testroot + $(MAKE) clean + rm -f *-stamp + dh_clean --- aoetools-26.orig/debian/copyright +++ aoetools-26/debian/copyright @@ -0,0 +1,27 @@ +This package was firstly debianized by David Martínez Moreno on +Sat, 23 Apr 2005 03:39:56 +0200. + +It was downloaded from http://aoetools.sf.net/ + +Upstream Author: Ed L. Cashin + +Copyright: (C) 2007 by Coraid, Inc., Ed Cashin and Erik Quanstrom. + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. --- aoetools-26.orig/debian/aoetools.docs +++ aoetools-26/debian/aoetools.docs @@ -0,0 +1,3 @@ +NEWS +README +devnodes.txt --- aoetools-26.orig/debian/control +++ aoetools-26/debian/control @@ -0,0 +1,34 @@ +Source: aoetools +Section: admin +Priority: optional +Maintainer: David Martínez Moreno +Standards-Version: 3.8.0 +Homepage: http://aoetools.sf.net +Build-Depends: debhelper (>= 5) + +Package: aoetools +Architecture: any +Section: admin +Priority: optional +Depends: ${shlibs:Depends}, lsb-base +Description: tools to assist in using ATA over Ethernet + The aoetools are programs that assist in using ATA over Ethernet. This + tools are designed to work with the "aoe" driver for Linux 2.6 kernels; + in fact, this version recommends kernel 2.6.14 or later, as both support + up to 16 slots per shelf address. + . + Systems running Linux 2.4 kernels do not need and should not install + the aoetools. The aoe driver for 2.4 kernels is self-sufficient. + . + There are several tools included in this package: + * aoecfg - manipulate AoE configuration strings + * aoe-discover - trigger discovery of ATA over Ethernet devices + * aoe-flush - flush the down devices out of the aoe driver + * aoe-interfaces - restrict network interfaces used for AoE + * aoe-mkdevs - create character and block device files + * aoe-mkshelf - create block device files for one shelf address + * aoeping - simple userland communication with AoE devices + * aoe-revalidate - revalidate the disk size of an AoE device + * aoe-stat - print status information for AoE devices + * aoe-version - print AoE-related software version information + * coraid-update - upload an update file to a Coraid appliance