Re: ./.libs/libamanda.so: undefined reference to `OPENSSL_init_ssl'

2017-01-23 Thread Eric Schnoebelen
Tobias writes:
- after trying to compile Amanda 3.4.1 on in Debian I get the following error

Do you have libcurl installed?  In 3.4.1, common-src/glib-util.c
uses LIBCURL_USE_OPENSSL without verifying HAVE_LIBCURL is set.

I provided a patch for this on amanda-hackers earlier in the
month, and Jean-Louis integrated it into the trunk. (thank you
Jean-Louis!)

- make[3]: Entering directory '/var/backups/amanda/amanda-3.4.1/common-src'
- /bin/bash ../libtool  --tag=3DCC   --mode=3Dlink gcc -Wall -Wextra 
-Wparentheses -Wdeclaration-after-statement -Wmissing-prototypes 
-Wstrict-prototypes -Wmissing-declarations -Wformat -Wformat-security 
-Wsign-compare -Wfloat-equal -Wold-style-definition -Wno-strict-aliasing 
-Wno-unknown-pragmas -Wno-deprecated-declarations -DAMANDA_FILE=3D\"`basename 
amflock-test.o`\" -g -O2 -fno-strict-aliasing -o amflock-test 
amflock-test.o libamanda.la libtestutils.la -lrt -lm -Wl,--export-dynamic 
-lgmodule-2.0 -pthread -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lnsl 
-lresolv
- libtool: link: gcc -Wall -Wextra -Wparentheses -Wdeclaration-after-statement 
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wformat 
-Wformat-security -Wsign-compare -Wfloat-equal -Wold-style-definition 
-Wno-strict-aliasing -Wno-unknown-pragmas -Wno-deprecated-declarations 
-DAMANDA_FILE=\"amflock-test.o\" -g -O2 -fno-strict-aliasing -o 
.libs/amflock-test amflock-test.o -Wl,--export-dynamic -pthread -pthread  
./.libs/libamanda.so ./.libs/libtestutils.a -lrt -lm -lgmodule-2.0 
-lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lnsl -lresolv -pthread -Wl,-rpath 
-Wl,/usr/local/lib/amanda
- ./.libs/libamanda.so: undefined reference to `OPENSSL_init_ssl'
- collect2: error: ld returned 1 exit status
- Makefile:2266: recipe for target 'amflock-test' failed
- 
- Openssl and libssl is of course installed.
- 
- Any ideas how to fix that?
- 
- Greetings
- Tobias

Enjoy,
Eric

--
Eric Schnoebelene...@cirr.comhttp://www.cirr.com
 "What a distressing contrast there is between the radiant intelligence of
  the child and the feeble mentality of the average adult." -- Sigmund Freud



Re: amanda-3.3.9 compilation fails on freebsd 10.2-RELEASE-p20

2016-10-06 Thread Eric Schnoebelen
jens.wi...@parcit.de writes:
- Hello,
- 
- i'm trying to compile amanda-3.3.9 on  freebsd 10.2-RELEASE-p20,
- because i didn't find any packages.
-
- I get the following Error on gmake:
- 
- libtool: link: ( cd ".libs" && rm -f "libtestutils.la" && ln -s
- "../libtestutils.la" "libtestutils.la" )
- gcc -DHAVE_CONFIG_H -I. -I../config -I../gnulib -I../common-src
- -D_THREAD_SAFE -D_GNU_SOURCE -I/usr/local/include
- -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
- -I/usr/local/include -pthread   -I/usr/local/include  -g -O2  -MT
- amflock-test.o -MD -MP -MF .deps/amflock-test.Tpo -c -o amflock-test.o
- amflock-test.c
- amflock-test.c: In function 'test_intra_proc_locking':
- amflock-test.c:309:5: warning: 'g_thread_create' is deprecated (declared
- at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:104): Use
- 'g_thread_new' instead [-Wdeprecated-declarations]
-  thd =3D g_thread_create((GThreadFunc)test_intra_proc_locking_thd,
- (gpointer)thd_fds, TRUE, NULL);
-  ^
- mv -f .deps/amflock-test.Tpo .deps/amflock-test.Po
- /bin/sh ../libtool  --tag=3DCC   --mode=3Dlink gcc  -g -O2 -o amflock-test
- amflock-test.o libamanda.la libtestutils.la -lcrypto -L/usr/local/lib
- -lcurl -lm -L/usr/local/lib -Wl,--export-dynamic -lgmodule-2.0
- -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lintl   -lintl
- libtool: link: gcc -g -O2 -o .libs/amflock-test amflock-test.o
- -Wl,--export-dynamic -pthread  ./.libs/libamanda.so
- -L/usr/local/lib ./.libs/libtestutils.a -lcrypto -lcurl -lm -lgmodule-2.0
- -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl -pthread -Wl,-rpath
- -Wl,/usr/local/lib/amanda
- /usr/local/bin/ld: warning: libcrypto.so.7, needed
- by /usr/local/lib/libcurl.so, may conflict with libcrypto.so.8
- ./.libs/libamanda.so: undefined reference to `__builtin_ia32_crc32si'
- ./.libs/libamanda.so: undefined reference to `__builtin_ia32_crc32qi'
- ./.libs/libamanda.so: undefined reference to `__builtin_ia32_crc32hi'
- ./.libs/libamanda.so: undefined reference to `__builtin_ia32_crc32di'
- collect2: error: ld returned 1 exit status
- gmake[3]: *** [Makefile:2210: amflock-test] Error 1
- gmake[3]: Leaving directory '/usr/src/amanda-3.3.9/common-src'
- gmake[2]: *** [Makefile:2063: all] Error 2
- gmake[2]: Leaving directory '/usr/src/amanda-3.3.9/common-src'
- gmake[1]: *** [Makefile:1668: all-recursive] Error 1
- gmake[1]: Leaving directory '/usr/src/amanda-3.3.9'
- gmake: *** [Makefile:1592: all] Error 2
- 
- Any ideas how to fix this?

The amanda build infrastructure is assuming gcc, and the gcc
supporting libraries/infrastructure. (amanda-developers, hint,
all the world does not run on linux, nor does it use gcc :D )

When I started attempting to update the pkgsrc package(s) for
amanda, I found I needed to apply the following patch, at least
to quiet the above error.  I don't know if it will create a
functioning build yet or not (the pkgsrc package update project
got stashed on a back burner not long after.)


$NetBSD$

Disable attempting to use GCC __builtin_ functions.

To do this correctly, there should be a feature test in the configure
program. (I'll try to make those changes later..)

--- common-src/util.c.orig  2016-02-09 22:52:51.0 +
+++ common-src/util.c
@@ -1727,7 +1727,7 @@ make_amanda_tmpdir(void)
 }
 
 #define POLY 0x82F63B78
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
 static int get_sse42(void)
 {
 uint32_t op, eax, ebx, ecx, edx;
@@ -1759,7 +1759,7 @@ static gboolean crc_initialized = FALSE;
 int have_sse42 = 0;
 void (* crc32_function)(uint8_t *buf, size_t len, crc_t *crc);
 
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
   #include "amcrc32chw.h"
 #endif
 
@@ -1772,7 +1772,7 @@ make_crc_table(void)
 int slice;
 
 if (!crc_initialized) {
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
have_sse42 = get_sse42();
if (have_sse42) {
crc32c_init_hw();

--
E

Re: sw_vers not found on FreeBSD

2015-01-20 Thread Eric Schnoebelen
"Joi L. Ellis" writes:
- A rather general-purpose way to check for *nix is to cat /etc/issue.net,
- which is the login-banner for a remote shell connection.  These
- usually default to a line with the OS version and hostname, printed
- before the login prompt.

uhm, no.  While that may have once been true, I believe it was only
true of System V derived releases.  BSD releases don't have anything
like /etc/issue{.net}. (and I don't remember /etc/issue{,.net} on
any version of BSD I've touched, dating back to BSD 4.2.)

As an example:
egsner-> uname -rs
NetBSD 7.0_BETA
egsner-> ls -l /etc/issue*
ls: No match.

uname(1) or uname(3) are a much better starting point.  

I would sugguest that if uname -s returns 'Linux', then start
using alternative methods to figure out which distribution is in
use. (fyi: I am unable to find sw_vers on the CentOS/RHEL
systems I have.)

Doesn't the LSB (Linux Standards Base) require a file such as
lsb-release to describe the distibution? 

Not that RHEL has that, having /etc/redhat-release fill that role.
Hmm, maybe it's /etc/system-release that LSB specifies, my RHEL
boxes seem to have that.

No debian derived boxes to check, sorry.

- -Original Message-
- From: owner-amanda-us...@amanda.org [mailto:owner-amanda-us...@amanda.org] 
- On Behalf Of Greg Troxel
- Sent: Monday, January 19, 2015 19:28
- To: Eric Schnoebelen
- Cc: Jean-Louis Martineau; amanda-users@amanda.org
- Subject: Re: sw_vers not found on FreeBSD
- 
- 
- e...@cirr.com (Eric Schnoebelen) writes:
- > Jean-Louis Martineau writes:
- > - selfcheck try to return the distro and version of the OS.
- > - How can it get that information on freebsd? or other bsd?
- > - How to get the 'FreeBSD' string and the '10.1' string?
- >
- > uname -s -> 'FreeBSD'/'NetBSD'/'OpenBSD'/'DragonFlyBSD'
- > uname -r -> '10.1'/'6.1_STABLE'/...
- >
- > "uname -s" provides the system name, and "uname -r" provides the OS 
- > revision (on every UNIX family system except Linux, where they return 
- > "Linux" and the kernel revision.  A side effect of how Linux 
- > distributions are created.)
- 
- Note that uname is specified by POSIX:
- 
- http://pubs.opengroup.org/onlinepubs/9699919799/utilities/uname.html
- 
- So really, uname output should be used first, and if there needs
- to be some Linux-specific extra information because of "distributions",
- that should be special-case code for Linux.
- 
- FWIW, uname -s and -r on a NetBSD box:
- 
- NetBSD
- 6.1_STABLE
- 


Re: sw_vers not found on FreeBSD

2015-01-14 Thread Eric Schnoebelen
Jean-Louis Martineau writes:
- On 01/14/2015 06:34 AM, Toomas Aas wrote:
- > I just installed a new Amanda server, version 3.3.6 on FreeBSD 10.1 
- > amd64. There seems to be a cosmetic issue during selfcheck, client 
- > tries to execute something called /usr/bin/sw_vers, which does not 
- > exist (snippet of selfcheck.debug attached). Selfcheck succeeds 
- > despite of this problem.
- >
- 
- selfcheck try to return the distro and version of the OS.
- How can it get that information on freebsd? or other bsd?
- How to get the 'FreeBSD' string and the '10.1' string?

uname -s -> 'FreeBSD'/'NetBSD'/'OpenBSD'/'DragonFlyBSD'
uname -r -> '10.1'/'6.1_STABLE'/...

"uname -s" provides the system name, and "uname -r" provides the
OS revision (on every UNIX family system except Linux, where
they return "Linux" and the kernel revision.  A side effect of
how Linux distributions are created.)

Other interesting attributes provided by a BSD uname (I've long
since forgotten about HP-UX and Solaris and IRIX, sorry):

uname -m->  machine hardware name (i386/amd64/etc)
    uname -n->  node name (aka short system name)
uname -p->  machine processor architecture name

--
Eric Schnoebelene...@cirr.comhttp://www.cirr.com
In every real man a child is hidden that wants to play. 
  -- Friedrich Nietzsche


Re: error compiling amanda on FreeBSD 6.3 x86_64

2008-03-22 Thread Eric Schnoebelen

Oscar Ricardo Silva writes:
- I'm attempting to compile the client version of amanda on a Dell
- PowerEdge server running FreeBSD 6.3 but keep running into an
- ssh related error.  I use the following configure statement:

Use the port from /usr/ports.. It has patches to fix both of the
errors.

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
"I'm going to a commune in Vermont and will deal with no unit of time
shorter than a season" -- Josh Rosen in _The Soul of a New Machine_


Re: IPv6 Question

2008-01-27 Thread Eric Schnoebelen

"Yoshihiro Ishikawa" writes:
- I used
- {{{
- [EMAIL PROTECTED] network-scripts]# more /etc/redhat-release
- Fedora Core release 6 (Zod)
- [EMAIL PROTECTED] ~]$ amadmin xx version
- build: VERSION="Amanda-2.5.2p1"
- }}}
- 
- I want to use the IPv6 with the Amanda, so now i test on only local backup.
- But I regret to inform you that I don't have further knowledge about the IP
- v6.

[..]

- But the next config is not working.
- 
- #Pattern2:
- 
- [disklist]
- fedora_ipv6 /etcroot-tar# USE IPV6
- 
- [/etc/hosts]
- fe80::215:c5ff:fe77:8c47fedora_ipv6
- 
- "fe80::215:c5ff:fe77:8c47" is the eth0 on the same host.

What does the IPv6 routing table show?  Does it show a host
route of the systems local address pointing to the loopback
(lo?) interface?

On most systems, part of the networking initialization inserts
host routes for the local host's addresses pointing at the
loopback interface.

I hope this helps,
Eric

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
Einstein argued that there must be simplified explanations of
 nature, because God is not capricious or arbitrary.  No such 
faith comforts the software engineer.  -- Fred Brooks


Re: 2.5.2p1 build problems on FreeBSD

2007-09-24 Thread Eric Schnoebelen

stan writes:
- I get the following error while runing configure:
- 
- checking for lint... /usr/bin/lint
- lint: illegal option -- f
- usage: lint [-abceghprvwxzHF] [-s|-t] [-i|-nu] [-Dname[=def]] [-Uname] [-X
- [,
- >
- >
- checking for raw ftape device... /dev/null
- checking for Kerberos and Amanda kerberos4 bits... no
- ./configure.lineno: 13541: Syntax error: Bad substitution
- 
- Any sugestions as to what I can do to fix this?

Beat up some of the developers for using non-portable
code??? :D

Seriously, either use bash to run configure ( you'll still get
the message about/from lint), or look in the bug tracker for a
patch I submitted to cure both problems
([EMAIL PROTECTED])

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
Microsoft: Where do you want to go today?
 Linux: Where do you want to go tomorrow?
   *BSD: Are you guys coming or what?


Re: Problems with chg-scsi

2006-01-26 Thread Eric Schnoebelen

Sven Rudolph writes:
- [EMAIL PROTECTED] (Eric Schnoebelen) writes:
- > I did take a quick look at chg-mtx, and to be honest,
- > I'm not sure it would be able to manage my 80 and 120 tape
- > robots. There are some interesting assumptions coded into it.
- 
- chg-zd-mtx (i guess you mean this) works fine for me with a 130
- tape changer (five Overland Neo 2000 boxes stacked together).

No, I meant chg-mtx.  I hadn't looked at chg-zd-mtx.  It
looks a bit better.

On the other hand, what I've got works, so I'm not
inclined to change.

--
Eric Schnoebelen[EMAIL PROTECTED]
http://www.cirr.com
"Bureaucracies interpret communication as damage and route around it."
-- Jamie Zawinski 


Re: Problems with chg-scsi

2006-01-25 Thread Eric Schnoebelen

Ian Turner writes:
- On Wednesday 25 January 2006 02:22 pm, Eric Schnoebelen wrote:
- > NetBSD and FreeBSD do have very functional changer management
- > command line tools and system call interfaces, and both the
- > command line and system call interfaces are very stable.
- 
- MTX works on all the BSDs, as far as I know. I guess you need to
- use the ports system to install it? What is the native changer
- management tool?

The native changer management tool is chio(1).  

I don't know if mtx is available in NetBSD as part of
pkgsrc, I've never had the desire to go looking.

I did take a quick look at chg-mtx, and to be honest,
I'm not sure it would be able to manage my 80 and 120 tape
robots. There are some interesting assumptions coded into it.

Using chg-scsi, after a small amount of configuration
via a configuration file, all seems to work for me.  I find that
to be better than having to modify chg-mtx for use on my system,
and then risking loosing those changes when I upgrade the system
later.

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
Churchill's Commentary on Man: Man will occasionally stumble over the
truth, but most of the time he will pick himself up and continue on.


Re: Problems with chg-scsi

2006-01-25 Thread Eric Schnoebelen

Jon LaBadie writes:
- On Wed, Jan 25, 2006 at 01:22:52PM -0600, Eric Schnoebelen wrote:
- > Of course, the main reason I use it is that I did some
- > of the original work for what became chg-scsi. (of course, it's
- > diverged greatly from what I wrote, but..)
- 
- Might I ask, what prompted you to write a compiled program that
- accessed the scsi calls directly when all the other changer programs
- are scripts using other command line tools to manipulate the changer?
- No criticism implied, just curious about the historical rationale.

Well, at the time (I think, 1998, maybe as early as 1996)
there weren't many/any script based changer controllers out there.
seagate-changer was included as an example, and did better than
80% of what I needed at the time.

Since then, someone on the amanda team heavily revised
the code to support more changer interfaces (something I had
started, but they extensively updated and modified the
architecture I had implemented.)  I get the impression that the
person who did a lot of those changes has since disappeared.

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
Churchill's Commentary on Man: Man will occasionally stumble over the
truth, but most of the time he will pick himself up and continue on.


Re: Problems with chg-scsi

2006-01-25 Thread Eric Schnoebelen

Jon LaBadie writes:
- On Thu, Jan 19, 2006 at 06:58:11AM -0500, Scott R. Burns wrote:
- > NetBSD/i386 is my platform (think of it as FreeBSD only better :-)).
- 
- Just an observation;
- nearly all who responded to Ian query saying they still use chg-scsi
- and who mentioned their OS, indicated it was one of the BSD variants.
- 
- Is there something about the BSD environment that encourages
- the use of chg-scsi vs. the other changer scripts?
- Maybe no or difficult port of mtx?

mtx isn't part of the base system, at least with NetBSD
and FreeBSD.

NetBSD and FreeBSD do have very functional changer management
command line tools and system call interfaces, and both the
command line and system call interfaces are very stable.

Of course, the main reason I use it is that I did some
of the original work for what became chg-scsi. (of course, it's
diverged greatly from what I wrote, but..)

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
  Those who cannot remember the past are doomed to buy Microsoft products.


Re: Problems with chg-scsi

2006-01-18 Thread Eric Schnoebelen

Gene Heskett writes:
- On Wednesday 18 January 2006 13:47, Ian Turner wrote:
- >Is anyone out there using chg-scsi instead of chg-mtx or chg-zd-mtx?
- > If so, can you tell me why?

Well, I'm probably using it because I helped do the
initial development a long, long time ago.

That said, for the 2.4 tree, I've been maintaining a
couple of local patches that allow chg-scsi to work better in my
environment, as well as catch a number of the more obvious
defects in the released code.

I've submitted the patches before, but it seems they've
never been integrated. :(

Here are the notes I have at the top of the sources:


# Commentary:
#   The vast majority of the changes in this patch are to add support/fix
#for the Exabyte EXB-8505 and EXB-8900 8MM tape drives, when attached
#to NetBSD, and within an EXB-4[48]0 robot.
#   A smaller number of the changes are add support for the EXB-4[48]0 
#SCSI robots.
#   Additional changes to support the HP/Compaq SureStore C5151-2000 
#DLT robot.
#   A number of segmentation violations were also removed.
#   SCSI_LoadUnload was recoded to use a private structure, to make
#sure the correct bitfields were set.
#   Finally, a new function was added to set/clear the
#Prevent/Allow Medium Removal flag.
#   The remainder of the changes are to improve the debug-ability of
#the program, and the quality of the debug log
#
--- changer-src/scsi-changer-driver.c.orig  Tue Feb 27 17:10:39 2001
+++ changer-src/scsi-changer-driver.c

# Commentary:
#   Re-ordered the opening of the `scsitapedev' control device.  It is
#opened before the `dev' device. The failure to open `dev' was made
#non-fatal, as chg-scsi doesn't realy use `dev' for anything.
#   The reasoning for the reordering is that on NetBSD, /dev/nrstX
#returns ENODEV on a tape device when the device does not have 
#the medium ready.  /dev/enrstX has no such restrictions, and makes
#an excellent `scsitapedev'
#
--- changer-src/chg-scsi.c.orig Tue Oct 24 18:49:39 2000
+++ changer-src/chg-scsi.c  Sat Feb 17 22:32:27 2001


- I did use it for a while, but like you, I had problems, primarily 
- control, as in it did not seem to ever issue a rewind, [...]

- As for buffer issues, I didn't see anything in about 4-5 years that 
- would make me think there was a problem in that area.  Long enough to 
- wear out 5 of those Seagate 4586n DDS2 changers.

Thats interesting, as I wore out at least two of those
changers using chg-scsi on NetBSD and FreeBSD hosts.  Rewind
worked just fine for me.. (note, the last one of those went out
of service for me in 2001, although they're still sitting in the
garage awaiting a good use..)

Hmm, looking at the first of the patches above, I see
that I did have to change a call to GenericRewind to the device
specify rewind in Tape_Ready(). And I also see changes to
GenericRewind();

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
"But there's no one who likes the PC who doesn't like Microsoft."
-- Bill Gates


Re: BSD Users: Barcode Readers w/ chio(1)/mtx(1) ?

2005-08-19 Thread Eric Schnoebelen

"Brian A. Seklecki" writes:
- Is anyone using a barcode reader enabled tape changer on FreeBSD?

I'm not using FreeBSD (except as a client), but I am
using Amanda on NetBSD, attached to an Exabyte EXB-480 robot,
which has barcode support.

However, I'm using chg-scsi for Amanda's access to the
robot (not surprising, since my name is on a bit of that code..
:-)

If the robot you're using is one of the ones known by
chg-scsi, it's pretty easy.  And if your robot isn't known by
chg-scsi, it's usually pretty easy to add support for a new
robot, usually by taking the needed support pieces from the
working robots..

- I can't seem to find any good posts in the archive with example output 
- from "chio status -v" or "mtx status" on [Free]BSD w/ a working barcode 
- reader.
- 
- If you have one, could you post the output?

I don't have mtx, and chio(1) on NetBSD doesn't support
-v.   However, ``chio status voltags'' on NetBSD looks like
this: (only a few slots, the drives, and the portal)

slot 76: 
Primary volume tag: CIRM0081 ver. 0
slot 77: 
Primary volume tag:  ver. 0
slot 78: 
Primary volume tag: CIRM0079 ver. 0
slot 79: 
Primary volume tag:  ver. 0
slot 80: 
Primary volume tag: CIRM0074 ver. 0
portal 0: 
Primary volume tag: CIRM0087 ver. 0
From: drive 1
drive 0: 
Primary volume tag:  ver. 0
drive 1: 
Primary volume tag: CIRM0089 ver. 0
From: slot 40
drive 2: 
Primary volume tag:  ver. 0
drive 3: 
Primary volume tag:  ver. 0

- I was reading about ANSI/ISO standard labels.  I guess the standard that 
- applies to (DLT for example) is "ANSI MH10.8M-1983 Code 39 (3 of 9)."

Becareful.. In some topics (and I think this is one) a
"standard label" is an on-media entity used by tape management
systems.  It has little to do with the external (bar code) label
on the media enclosure.

- Supposedly, chio(1) can execute a command:
- 
-   # chio move voltag VOLUME01 drive 0

This doesn't work on NetBSD.

- I'm also curious: does this imply that the loader has a small cache in 
- which barcode are in which slots/locations?  Or is that cache in the 
- kernel?

As far as I can tell, the SCSI robot (at least on the
EXB robots) keep track of the barcodes, and where they are
located (assuming, of course, that there's a barcode reader on
the picker.)

-  Obviously the loader has a small cache (perhaps in an nvram) of 
- which slots are occupied, OR the "chio status" sends a SCSI inquiry 
- command which polls those sensors in hardware.

The information is transmitted from the robot to the
kernel/application by one of the SCSI changer control commands
(I probably knew which one in the past, but I've slept..)

- ...and finally, when chio(1) attempts to move a tape based on it's 
- "VOLTAG", is it using some cache of data from the loader nvram, or does 
- that imply that the barcode reader has to go out and re-read each tape's 
- label.  Is the barcode label attached to the picker?

The barcode label reader is attached to the picker.  The
barcodes themselves are attached to the media enclosures.  I
seem to remember that there is a SCSI command to request a move
based upon the media barcodes, but, see above for the accuracy
:)

Which robot are you trying to use?

--
Eric Schnoebelen[EMAIL PROTECTED]   
http://www.cirr.com
  Those who cannot remember the past are doomed to buy Microsoft products.


Re: debugging chg-scsi

2004-11-05 Thread Eric Schnoebelen

Erik Anderson writes:
- On Thu, 04 Nov 2004 15:36:05 -0600, Frank Smith <[EMAIL PROTECTED]> wrote:
- > Also, while sg is the proper device to use to control the changer,
- > it doesn't understand tape commands like rewind, so make sure your
- > tape device is referencing an st device (of course, your kernel
- > also needs scsi tape support compiled in or the module loaded or you
- > won't have any st devices).
- 
- Okay - well I'm getting conflicting messages here.  I had previously
- been using /dev/nst0 to access the tape drive.  That wasn't working,
- so someone here told me I should use the sg* nodes to access the
- drive.  So that's when I switched to /dev/sg2.  

I was the one who said to use the direct SCSI device,
but it wasn't as the tape drive, it was for the control device
(who's tag in changer.conf I didn't remember.)

In reviewing another posting in this thread, I'm
reminded that it's ``scsitapedev''.  Make that be /dev/sg2, and
leave ``tapedev'' as /dev/nrst0.  (hmm, make sure you're using
the raw tape device as well.. You've listed the no-rewind block
device, assuming Linux uses standard naming conventions.)

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
"Operator?, I'd like to make a syscall, please."


Re: debugging chg-scsi

2004-11-04 Thread Eric Schnoebelen

Gene Heskett writes:
- On Thursday 04 November 2004 12:52, Erik Anderson wrote:
- >On Thu, 4 Nov 2004 09:44:38 -0800, Stephen Carville 
- <[EMAIL PROTECTED]> wrote:
- >> Good luck.  I tried to get chg-scsi and chg-zg-mtx to works with a
- >> Spectra 2000 Treefrog and finally gave up.  I ended up writing my
- >> own changer control program.
- >
- >That's encouraging.  ;-(
- 
- I used chg-scsi when I had a tape drive, but it did have one gotcha, 
- it cannot handle a rewind correctly, nothing goes down the cable at 
- all.

That's an issue with the host operating system..
chg-scsi just issues a MTREW to the tape device.  If the
operating system doesn't do anything with it, well, then there'
not much it can do.. (I suppose it could issue a SCSI rewind
command directly, but it doesn't currently.)

One thing that chg-scsi seems to need, and I didn't see
in the configuration file, is a non-blocking control device for
the tape drive, in addition to the blocking device node used for
writes..  On linux, the sg* device corresponding to the tape
drive is a good one to try.  On NetBSD, the `enrst?' device is
the one to use..

-- eric, who's been using chg-scsi with Exabyte EXB120,
EXB480 and HP/Compaq DLT robots.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
Remember when Windows were for washing; a mouse was
for trapping and a UNIX guarded the harem?


Re: amdump/amrecover problem

2004-07-08 Thread Eric Schnoebelen

[EMAIL PROTECTED] writes:
- I've got the following error when I run amrecover:
- 
- -
- amrecover> add dumpdates
- Added /etc/dumpdates
- amrecover> extract
- 
- Extracting files using tape drive 0 on host typha.nmsu.edu.
- The following tapes are needed: Biology-1
- 
- Restoring files into directory /home/cngo
- Continue [?/Y/n]? y
- 
- Extracting files using tape drive 0 on host typha.nmsu.edu.
- Load tape Biology-1 now
- Continue [?/Y/n/s/t]? y
- EOF, check amidxtaped..debug file on typha.nmsu.edu.
- amrecover: short block 0 bytes
- UNKNOWN file
- amrecover: Can't read file header
- extract_list - child returned non-zero status: 1
- Continue [?/Y/n/r]? y
- amrecover> 
- 

What are the contents of amidxtaped..debug?
That'd probably be most enlightening.

As a guess, I'd say that the tape `Biology-1' wasn't
loaded when amidxtaped went to try and read from it.  Did you
see (hear?) the robot load the tape at the after you answered
yes, and before the above error message occurred.

- That error disappears if I comment out the 'tapedev "0" 'in my amanda.conf 
- file

The error disappears, but are you able to restore the
file?

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
If bankers can count, how come they have eight windows and only four tellers?


Re: Chg-scsi problem

2004-06-25 Thread Eric Schnoebelen

[EMAIL PROTECTED] writes:
- I'm running NetBSD 1.6.1 on Dell Lattitude. Here is the device information.
-   
- --- 
- st0 at scsibus1 target 1 lun 0:  tape removable 
- st0: drive empty 
- st0: sync (25.00ns offset 127), 16-bit (80.000MB/s) transfers 
- ch0 at scsibus1 target 6 lun 0:  changer removable
- ch0: async, 8-bit transfers 
- ch0: 58 slots, 1 drive, 1 picker, 2 portals 
- ch0: sync (100.00ns offset 15), 16-bit (20.000MB/s) transfers 
-  
- - 
- 
- Although, I got the message, amdump still runs ok. However, I really
- want to get rid off that error message and to make everything works
- smoothly.

The Ultrium probably needs a variation of the unload
command sequence, that the chg-scsi generic unload doesn't do..
(this is also true of the Exabyte drives.)

- Another thing. When I tried chg-chio, everything is fine. Could
- you please advise if I should you chg-scsi or chg-chio. I don't
- know what the advantages of chg-scsi is, compared with chg-chio.

I've not done anything with the modern chg-chio.  (er,
actually, I updated a chg-chio, but that was several years
ago, and it's since mutated further into chg-scsi.)

- Is that because, with chg-scsi, you can create the inventory of
- tapes? 

That's one good reason.  Using the barcode reader in the
robot, and it's corresponding mapping between barcodes and
Amanda labels, allows much faster access to individual tapes.

- I've already set emubarcode=1 in the chg-scsi.conf but I
- don't see any thing in labelfile and can't find the inventory
- anywhere. Any suggestion ?

I don't know what ``emubarcode'' does, my system has
``havebarcode'', which I have turned on.. (I wonder, did the
name change between 2.4.2 and 2.4.4?  I'm still on 2.4.2,
although I'm starting the upgrade process this afternoon.)

For ``havebarcode'' to be useful, there must be a
working barcode reader in the robot, and the tapes media must have
barcoded physical labels attached to the tape shells.  Several
vendors sell the  barcodes to attach, and at least one sells
media with the labels already attached.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
"Cutting the space budget really restores my faith in humanity.  It
 eliminates dreams, goals, and ideals and lets us get straight to the
 business of hate, debauchery, and self-annihilation." -- Johnny Hart


Re: Chg-scsi problem

2004-06-25 Thread Eric Schnoebelen

[EMAIL PROTECTED] writes:
- Thank you very much for very useful advice. I've change chg-scsi.conf
- file as  you said. I didn't get the Input/ouput error message.
- However, I still get the following errors:

It looks like the tape device isn't fully recognized.
What device is it? (with full model name/number, please) What
robot is it in?

Also, which version of NetBSD are you using, and on what
processor family?

As a guess, chg-scsi needs to learn about that tape
device type, and how to query it for ready status.

- Do you have any idea about it. BTW, I haven't tried your patches.
- Kindly have a look at my amanda.conf and chg-scsi.conf files and
- give me your advice.

The configuration files look good.


--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
If bankers can count, how come they have eight windows and only four tellers?


Re: Chg-scsi problem

2004-06-21 Thread Eric Schnoebelen

[EMAIL PROTECTED] writes:
- When I run amcheck with chg-scsi, I've got the following message:  
-   
- Amanda Tape Server Host Check  
- -  
- Holding disk /data/amanda: 24318827 KB disk space available, that's plenty 
-  
- amcheck-server: slot 0: tape_rdlabel: tape open: /dev/st0: Input/output error  

On netbsd, /dev/st0 is certainly the wrong device to be
using.  You want to use /dev/nrst0.

- All of my tapes are labeled and here is my chg-scsi.conf file  
-   
- number_configs  1  
- eject   0 
- sleep   5 
- cleanmax10
- scsitapedev /dev/st0  
- changerdev  /dev/ch0  
- tapestatus /usr/pkg/etc/amanda/backup/changer/status  
- labelfile  /usr/pkg/etc/amanda/backup/changer/label  
- debuglevel 9:0  
-   
- config  0  
- drivenum0  
- dev /dev/st0  
- startuse0 
- enduse  9 
- statfile/usr/pkg/etc/amanda/backup-scsi/changer/statfile   
- cleancart   57
- cleanfile   /usr/pkg/etc/amanda/backup/changer-scsi/tape0-clean   
- usagecount  /usr/pkg/etc/amanda/backup/changer-scsi/totaltime  

This should look more like this:


number_configs  1  
eject   0 
sleep   5 
cleanmax10
changerdev  /dev/ch0  
tapestatus /usr/pkg/etc/amanda/backup/changer/status  
labelfile  /usr/pkg/etc/amanda/backup/changer/label  
debuglevel 9:0  

config  0  
drivenum0  
dev /dev/nrst0  
scsitapedev /dev/enrst0  
startuse0 
enduse  9 
statfile/usr/pkg/etc/amanda/backup-scsi/changer/statfile   
cleancart   57
cleanfile   /usr/pkg/etc/amanda/backup/changer-scsi/tape0-clean   
usagecount  /usr/pkg/etc/amanda/backup/changer-scsi/totaltime  

FYI: I usually put the `cleanfile', `usagecount', `statfile',
`tapestatus' and `labelfile' files under /var/spool/amanda, to
leave the /usr/pkg clear of frequently modified files.

You might also find some patches I made for use on NetBSD interesting.
They are available at ftp://ftp.cirr.com/pub/utils/amanda.  Place
them in a pkgsrc shadow tree (subdirectory sysutils/amanda-server)
and set LOCALPATCHES to the top of the shadow tree, and rebuild.

FYI: I've been running Amanda on NetBSD for 10 years or
so.. Currently running on an AlphaPC64 as a tape server.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
"Everything is theoretically impossible, until it is done.  One could write
 a history of science in reverse by assembling the solemn pronouncements of
 highest authority about what could not be done and what could never happen."
 -- Robert Heinlein


Re: Problems building under HPUX

2004-03-15 Thread Eric Schnoebelen

"David Trusty" writes:
- I'm trying to build version 2.4.4p2 under HP/UX 11i with gcc 3.2
- and am having some problems.

Here's what I sent out in September (and again in
November) on this topic..  (and having just tried to find it in
the archives, I see why people don't.. the yahoo archive search is
nearly impossible to use!)

[forwarded message:]
From: [EMAIL PROTECTED] (Eric Schnoebelen)
To: "Paul W. Kerr" <[EMAIL PROTECTED]>
Subject: Re: HP-UX 11i amanda 2.4.4p1 compile 
In-reply-to: Your message of "Thu, 25 Sep 2003 20:07:57 EDT."
 <[EMAIL PROTECTED]> 
Date: Tue, 30 Sep 2003 16:11:18 -0500
Sender: [EMAIL PROTECTED]


"Paul W. Kerr" writes:
- While researching tips on how to successfully compile Amanda 2.4.4p1 on 
- 32bit hp-ux 11i, I discovered your e-mail thread from last year about 
- compiling amanda 2.4.2p2 for 11i.

Proabably I should ask "which 11i?" firt off.  Although
saying 32bit 11i suggests 11i V1.0 (aka B.11.11) on a PA
system..

- Can you shed light on any compiler of environment configuration
- changes you had to make to get your Amanda compile to work?  I
- would appreciate the benefit of your experience.

Well, until you sent mail, I hadn't built on 11i, as I
didn't have an 11i system available. Fortunately, a contract
with HP has made available a few 11i systems.. :-)

What I found is:  configure doesn't properly recognize
that HP-UX 11.11 has strftime and a declaration for the same,
nor does it recognize that it has gettimeofday and a
corresponding declaration. (in looking through config.h, I see
that HAVE_MKTIME and HAVE_MKTIME_DECL should also be defined and
aren't; and HAVE_SELECT/HAVE_SELECT_DECL; and
HAVE_TIME/HAVE_TIME_DECL; gosh, autoconf screwed up pretty well
here..)

Additionally, the  didn't compile cleanly
for me any time. :-(  (there's probably a patch to fix this, but
I haven't looked yet..)

I used the following script to configure amanda:

#!/bin/sh -x
# CC=/opt/ansic/bin/cc export CC
# CFLAGS="+DAportable -D_XOPEN_SOURCE_EXTENDED -Ae" export
CFLAGS

./configure \
CC=/opt/ansic/bin/cc \
CFLAGS="+DAportable -D_XOPEN_SOURCE_EXTENDED -Ae" \
--prefix=/opt/amanda \
--localstatedir=/var/opt/amanda \
--with-configdir=/etc/opt/amanda \
--with-group=sys \
--with-user=amanda \
--with-fqdn

And then the following diffs to get config/config.h to
look right:

--- config/config.h Tue Sep 30 15:44:22 2003
+++ config/config.h.saveTue Sep 30 15:49:42 2003
@@ -348,10 +348,10 @@
 #define HAVE_GETSOCKOPT_DECL 1
 
 /* Define to 1 if you have the `gettimeofday' function. */
-/* #undef HAVE_GETTIMEOFDAY */
+#define HAVE_GETTIMEOFDAY 1
 
 /* Define if gettimeofday is declared. */
-/* #undef HAVE_GETTIMEOFDAY_DECL */
+#define HAVE_GETTIMEOFDAY_DECL 1
 
 /* Define to 1 if you have the `getvfsent' function. */
 /* #undef HAVE_GETVFSENT */
@@ -501,10 +501,10 @@
 #define HAVE_MKTEMP_DECL 1
 
 /* Define to 1 if you have the `mktime' function. */
-/* #undef HAVE_MKTIME */
+#define HAVE_MKTIME 1
 
 /* Define if mktime is declared. */
-/* #undef HAVE_MKTIME_DECL */
+#define HAVE_MKTIME_DECL 1
 
 /* Define to 1 if you have a working `mmap' system call. */
 /* #undef HAVE_MMAP */
@@ -636,10 +636,10 @@
 /* #undef HAVE_SCSI_SG_H */
 
 /* Define to 1 if you have the `select' function. */
-/* #undef HAVE_SELECT */
+#define HAVE_SELECT 1
 
 /* Define if select is declared. */
-/* #undef HAVE_SELECT_DECL */
+#define HAVE_SELECT_DECL 1
 
 /* Define to 1 if you have the `sendto' function. */
 #define HAVE_SENDTO 1
@@ -777,10 +777,10 @@
 #define HAVE_STRERROR_DECL 1
 
 /* Define to 1 if you have the `strftime' function. */
-/* #undef HAVE_STRFTIME */
+#define HAVE_STRFTIME 1
 
 /* Define if strftime is declared. */
-/* #undef HAVE_STRFTIME_DECL */
+#define HAVE_STRFTIME_DECL 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_STRINGS_H 1
@@ -908,10 +908,10 @@
 #define HAVE_SYS_WAIT_H 1
 
 /* Define to 1 if you have the `time' function. */
-/* #undef HAVE_TIME */
+#define HAVE_TIME 1
 
 /* Define if time is declared. */
-/* #undef HAVE_TIME_DECL */
+#define HAVE_TIME_DECL 1
 
 /* Define to 1 if you have the `tolower' function. */
 #define HAVE_TOLOWER 1

Unfortunately, that doesn't get the Makefile in
common-src cleaned up properly.  The diff to common-src/Makefile
is:

--- common-src/Makefile.saveTue Sep 30 15:58:24 2003
+++ common-src/Makefile Tue Sep 30 16:00:18 2003
@@ -115,7 +115,7 @@
 LIBTOOL_DEPS = config/ltmain.sh
 LN_S = ln -s
 LTALLOCA = 
-LTLIBOBJS =  mktime$U.lo strftime$U.lo
+LTLIBOBJS =  
 MAILER = /usr/bin/mailx
 MAXTAPEBLOCKSIZE = 32
 MCUTIL = mcutil
@@ -171,7 +171,7 @@

Re: Amanda & HP/UX (11.00 and 11.11)

2003-11-20 Thread Eric Schnoebelen
[EMAIL PROTECTED] writes:
- Off-hand, I don't know where tzfile.h comes from, can't seem to
- find it in depots, etc.  So: are there any Amanda 2.4.4p1 binaries
- for HP/UX 11.11 and 11.00, or, failing that, an HP/UX-cum-Amanda
- HOWTO?

Well, 2.4.4p1 has some configure strangeness that causes
it to miss a _bunch_ of POSIX functions that are provided by
HP-UX.  I haven't had time to go through and figure out how to
fix them.

Here's the configure set I used to compile 2.4.2p? on
HP-UX 11.00 and 11.11.

#!/bin/sh -x
CFLAGS="+DAportable -Ae"
./configure --prefix=/opt/pkg \
--localstatedir=/var/pkg \
--without-server \
--with-user=amanda \
--with-group=sys \
--with-pid-debug-files

Attached is a message I sent to someone else who was asking the
same questions about building amanda 2.4.4 on HP-UX 11.11.  It
includes a set of post-configure patches to actually make the
bloody thing build. Maybe this will help someone on the
development team figure out what's broken with the configure
script.

--
Eric Schnoebelen[EMAIL PROTECTED]http://www.cirr.com
Theoretical Physicist -- a physicist whose existence has been
postulated, to make the numbers balance, but who is
never actually observed in the laboratory.
--- Begin Message ---

"Paul W. Kerr" writes:
- While researching tips on how to successfully compile Amanda 2.4.4p1 on 
- 32bit hp-ux 11i, I discovered your e-mail thread from last year about 
- compiling amanda 2.4.2p2 for 11i.

Proabably I should ask "which 11i?" firt off.  Although
saying 32bit 11i suggests 11i V1.0 (aka B.11.11) on a PA
system..

- Can you shed light on any compiler of environment configuration
- changes you had to make to get your Amanda compile to work?  I
- would appreciate the benefit of your experience.

Well, until you sent mail, I hadn't built on 11i, as I
didn't have an 11i system available. Fortunately, a contract
with HP has made available a few 11i systems.. :-)

What I found is:  configure doesn't properly recognize
that HP-UX 11.11 has strftime and a declaration for the same,
nor does it recognize that it has gettimeofday and a
corresponding declaration. (in looking through config.h, I see
that HAVE_MKTIME and HAVE_MKTIME_DECL should also be defined and
aren't; and HAVE_SELECT/HAVE_SELECT_DECL; and
HAVE_TIME/HAVE_TIME_DECL; gosh, autoconf screwed up pretty well
here..)

Additionally, the  didn't compile cleanly
for me any time. :-(  (there's probably a patch to fix this, but
I haven't looked yet..)

I used the following script to configure amanda:

#!/bin/sh -x
# CC=/opt/ansic/bin/cc export CC
# CFLAGS="+DAportable -D_XOPEN_SOURCE_EXTENDED -Ae" export
CFLAGS

./configure \
CC=/opt/ansic/bin/cc \
CFLAGS="+DAportable -D_XOPEN_SOURCE_EXTENDED -Ae" \
--prefix=/opt/amanda \
--localstatedir=/var/opt/amanda \
--with-configdir=/etc/opt/amanda \
--with-group=sys \
--with-user=amanda \
--with-fqdn

And then the following diffs to get config/config.h to
look right:

--- config/config.h Tue Sep 30 15:44:22 2003
+++ config/config.h.saveTue Sep 30 15:49:42 2003
@@ -348,10 +348,10 @@
 #define HAVE_GETSOCKOPT_DECL 1
 
 /* Define to 1 if you have the `gettimeofday' function. */
-/* #undef HAVE_GETTIMEOFDAY */
+#define HAVE_GETTIMEOFDAY 1
 
 /* Define if gettimeofday is declared. */
-/* #undef HAVE_GETTIMEOFDAY_DECL */
+#define HAVE_GETTIMEOFDAY_DECL 1
 
 /* Define to 1 if you have the `getvfsent' function. */
 /* #undef HAVE_GETVFSENT */
@@ -501,10 +501,10 @@
 #define HAVE_MKTEMP_DECL 1
 
 /* Define to 1 if you have the `mktime' function. */
-/* #undef HAVE_MKTIME */
+#define HAVE_MKTIME 1
 
 /* Define if mktime is declared. */
-/* #undef HAVE_MKTIME_DECL */
+#define HAVE_MKTIME_DECL 1
 
 /* Define to 1 if you have a working `mmap' system call. */
 /* #undef HAVE_MMAP */
@@ -636,10 +636,10 @@
 /* #undef HAVE_SCSI_SG_H */
 
 /* Define to 1 if you have the `select' function. */
-/* #undef HAVE_SELECT */
+#define HAVE_SELECT 1
 
 /* Define if select is declared. */
-/* #undef HAVE_SELECT_DECL */
+#define HAVE_SELECT_DECL 1
 
 /* Define to 1 if you have the `sendto' function. */
 #define HAVE_SENDTO 1
@@ -777,10 +777,10 @@
 #define HAVE_STRERROR_DECL 1
 
 /* Define to 1 if you have the `strftime' function. */
-/* #undef HAVE_STRFTIME */
+#define HAVE_STRFTIME 1
 
 /* Define if strftime is declared. */
-/* #undef HAVE_STRFTIME_DECL */
+#define HAVE_STRFTIME_DECL 1
 
 /* Define to 1 if you have the  header file. */
 #de

Re: /dev/ch0: Permission denied ??

2002-11-17 Thread Eric Schnoebelen

"Kevin F. La Barre" writes:
- Eric, thanks for your reply.  Yes, I'm running all of the am* (amlabel, 
- etc.) as user amanda which is in the operator group.  

Have you restarted your amanda shell since adding amanda
to group operator?

Beyond that, I'm without clues..


--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
  Cats seem to go on the principle that it never does any harm to
  ask for what you want. -- Joseph Wood Krutch



Re: /dev/ch0: Permission denied ??

2002-11-16 Thread Eric Schnoebelen

"Kevin F. La Barre" writes:
- Here's an interesting one.. using Amanda 2.4.3 on FreeBSD 4.5 with a 
- Quantum 2500xt DLT 5 tape changer.  Amanda is setup to run as user amanda 
- and group operator.  chio seems to work fine as I can move tapes around, 
- get the status, etc.  Trying to amlabel however is unsuccessful as user 
- amanda as the system returns a permissions error:

Are you running those commands as the amanda user?  None of
the amanda programs are setuid(amanda), so if you're not the amanda
user, or in the operator group yourself, they will fail.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
  I am a Marxist, of the Groucho tendency. -- Anon., French slogan



Re: chg-scsi: dev and scsitapedev on IRIX

2002-10-11 Thread Eric Schnoebelen

Luc Lalonde writes:
- What would be the difference between "dev" and "scsitapedev"?  Would 
- "dev" be the tape device name and "scsitapedev" be the scsi controller 
- device name?

dev is the blocking tape device name (/dev/nrst0), while
scstapedev is the non blocking (control) device name
(/dev/enrst0 on NetBSD, I'm not sure there is something
comparable on IRIX, there wasn't the last time I plaed with it,
circa 1995)

Try leaving scsitapedev unset.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
Beneath revolution (Linux) there's also evolution (*BSD) 
-- Andre Oppermann, Apr. 1998



Re: permission denied with BSD

2002-07-24 Thread Eric Schnoebelen


"Eduardo Ceva" writes:
- I setup my backup scheme like this. I mount all of my server
- using NFS under /mnt/backup/servername, for exemple if the server
- is PIAUI I mount using NFS at /mnt/backup/piaui.

- All my linux servers works fine bacouse at exports file I include
- the option no_root_squash, and the backup finish with success
- every day, but in the BSD this option doesn=B4t exist, and I get
- the message "permission denied". I read the man page of exports
- on BSD and I found the option rootmap. Someone knows how to make
- the rootmap option works like no_root_squash?

A description of what ``no_root_squash'' does would have
helped us BSD-heads...  Oh well, I found the description using
FreeBSD's manual page engine, looking at the RedHat 7.1 manual
pages.

Basically, it's what the commercial OS's list as the
``root='' option, and the BSD sources list as
``-maproot=''.

So, you want to add ``-maproot=root'' to the filesystem
entry in the exports file on your BSD servers.


--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
I have seen the truth and it makes no sense.



Re: make problem - HP-UX 11i, amanda 2.4.2p2

2002-05-31 Thread Eric Schnoebelen


Gary Hines writes:
-   I'm using gcc, and I just downloaded the new gcc3.1 from the hp
- porting site, but I still get the same error.

My experience with software from the Porting Centre
doesn't instill confidence.  It seems they frequently build in
one directory, and then package it to install in another (which
breaks things massively.)

-  Does gcc come with separate
- includes?

Part of the gcc installation process is to
preprocess/reprocess some of the system include files into
something gcc likes better.  Odds are, the Porting Centre build
didn't get that done, or the includes didn't get put into the
depot.

-The socket.h that came with the HP includes the header file that
- defines the types that I'm getting the errors on (sbsize_t, bsize_t,
- sbsize64_t, and bsize64_t), but for some reason they don't seem to be
- getting include'd in the compilation. I'm wondering if gcc has a different
- socket.h that would work?

The problem is more likely the  file.  It's
entirely possible that the amanda source isn't including
 before including  and it's required
on HP-UX (it certainly is on NetBSD and Solaris, but may not be
required on some versions of Linux, where much of the amanda
development occurs.)

I have HP's commercial C compiler installed on my HP-UX
11.00 system, and would gladly build an amanda kit to your
configuration.  (the 11.00 binaries will run just fine on your
11i (11.11+) system -- after all, that's how HP builds them..
:-)

-- 
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
  "Linux in some ways is the Jerry Springer of operating systems, ..."
 Bruce Becker in comp.sys.sun.wanted



Re: make problem - HP-UX 11i, amanda 2.4.2p2

2002-05-30 Thread Eric Schnoebelen


Gary Hines writes:
- I'm just stuck trying to figure out why socket.h is not compiling

It looks like you're attempting to use the bundled
compiler on HP-UX.  Unfortunately, the bundled compiler is
only (barely) suited to building new kernels on HP-UX (and
occasionally bootstraping gcc.)

You really need either the ANSI C suite, or gcc, to
build amanda.. Amanda uses a lot of ANSI C features, as do the
system include files.. (You might get away with making sure that
__STDC__ isn't defined during your configure and build, but I
doubt it..)

If you like, I can put the HP-UX amanda client up for
ftp.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
  "Any sufficiently advanced bureaucracy is indistinguishable from molasses."
  -- Unknown



Re: Problems with chio tape changer under NetBSD

2001-12-18 Thread Eric Schnoebelen


Malcolm Herbert writes:
- This may affect other versions of *BSD which also use chio to manage 
- the tape changer, I don't know ... 

Why not use chg-scsi?  It knows how to use the chio
ioctl(2) interfaces to manipulate the robots.  I use it to run
my Exabyte EXB-480 robot, my HP/Compaq SureStore DLT robot, and
my Archive 4586NP loader.

I run on NetBSD 1.5.*, on an AlphaPC64. (previously on
NetBSD 1.3 on i386)  I wrote the predecessor of chg-scsi on the
NetBSD 1.3 system.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
Man seeking truth:  "Were we created like this, or did we evolve from apes?"
Guru: "We were bought on credit and never paid for, and are being
repossessed one by one."



Re: trouble on freebsd

2001-08-29 Thread Eric Schnoebelen


Kurt Yoder writes:
- I am trying to get the Amanda client working on a FreeBSD4 box. I
- installed 2.4.2p1 (and also p2 in trying to resolve this). I run the
- dump, and get two different errors on two boxes:

First off, I'd stronly recommend building from the ports
collection.. The amanda that is in the ports collection builds
and runs just fine on FreeBSD 4.x.

- FAILED AND STRANGE DUMP DETAILS:
- 
- /-- aragorn.sh /dev/da0s1a lev 0 FAILED [/usr/bin/tar returned 1]
- sendbackup: start [aragorn.shcorp.com:/dev/da0s1a level 0]
- sendbackup: info BACKUP=/usr/bin/tar
- sendbackup: info RECOVER_CMD=/usr/bin/tar -f... -
- sendbackup: info end
- ? gtar: ./dev/rsa0.ctl: minor number too large; not dumped
- | Total bytes written: 186224640
- sendbackup: error [/usr/bin/tar returned 1]
- \
- 
- /-- galadriel. /dev/ad0s1g lev 0 FAILED [data timeout]
- sendbackup: start [galadriel.shcorp.com:/dev/ad0s1g level 0]
- sendbackup: info BACKUP=/usr/bin/tar
- sendbackup: info RECOVER_CMD=/usr/bin/tar -f... -
- sendbackup: info end
- ? sendbackup: index tee cannot write [Broken pipe]
- sendbackup: error [/usr/bin/tar got signal 13, index returned 1]
- \
- 
- I've tried various gtar versions, including 1.11.2, 1.13, and 1.13.19,
- but they all give me errors. Does anyone know how to fix this?

Add `./dev/*' to the gnu tar exlude file on the affected
hosts.

The problem is that FreeBSD has gone to 32 bit device
numbers, and gtar (and the POSIX spec?) only expect a 16 bit
device number.

Not backing up the devices directory shouldn't cause any
great heart-ache, as MAKEDEV exists to recreate the device
nodes.

--
Eric Schnoebelen[EMAIL PROTECTED]http://www.cirr.com
"Bureaucracies interpret communication as damage and route around it."
-- Jamie Zawinski 



Re: Amanda and SCSI tape changers under NetBSD (Sparc)

2001-08-21 Thread Eric Schnoebelen


Craig Dewick writes:
- The box already runs the client side of Amanda, but I'm wondering about
- using SCSI tape changers with NetBSD under control of Amanda. Does
- 'chg-scsi' work happily in this scenario? My tape changer is an ADIC 1200,
- but I've changed the tape drive from a Sony SDT-5000 to an SDT-9000 for
- higher storage capacity.

I've been running Amanda on NetBSD for five years or so.
In fact, I wrote what is now chg-chio (I think), as well as the
ancestor of chg-scsi on NetBSD.

I'm currently running Amanda straight out of the
packages collection on NetBSD 1.4* and 1.5* (and I had been
running it on NetBSD 1.3.1 as well), with the server on an
Alpha, with an Exabyte EXB-480 robot.  As long as the ADIC
supports the standard SCSI changer command set, and doesn't
require any quirks entries, you should be fine.  If it does
require a quirk entry (in chg-scsi), it's not to hard to
generate.

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
The perfect love affair is one which is conducted entirely
  by post. -- George Bernard Shaw



Re: Problem with exb-480 and chg-scsi

2001-06-17 Thread Eric Schnoebelen

Christoffer Hall-Frederiksen writes:
- I have a Exabyte EXB-480 gismo with 4 Exabyte Mammoth EXB-8900
- tapedrives in it. Now if I use Eric Lee Green's mtx (1.2.12) the
- whole thing works just great. I can load and unload tapes and get
- a nice status of the robot just fine. But in my test-setup of amanda
- (version 2.4.2) I get a rather strange error when I use chg-scsi.
- Amcheck tells me this:

Amanda 2.4.x doesn't have the complete support for the
Exabyte EXB-4x0 robots.. I posted a group of patches to amanda-hackers
a number of weeks/months ago (didn't I?) to allow it to work.

I'll attach those patches here as well.  I've been using
Amanda with an EXB-480 since last September, quite successfully
(abit on a NetBSD/Alpha host) Also enclosed is a patch to keep
the server from leaking filedescriptors on large robots (like
the EXB-480.)

--
Eric Schnoebelen[EMAIL PROTECTED]   http://www.cirr.com
  There are two ways of constructing a software design: one way is to make 
  it so simple that there are obviously no deficiencies, and the other is 
  to make it so complicated there are no obvious deficiencies - CAR Hoare



$NetBSD$
# Commentary:
#   The vast majority of the changes in this patch are to add support/fix
#for the Exabyte EXB8505 8MM tape drive, when attached to NetBSD, and
#within an EXB-4[48]0 robot.
#   A smaller number of the changes are add support for the EXB-4[48]0 
#SCSI robots.
#   The remainder of the changes aer to improve the debugg-ability of
#the program, and the quality of the debug log
#   A number of segmentation violations were also removed.
#   SCSI_LoadUnload was recoded to use a private structure, to make
#sure the correct bitfields were set.
#   Finally, a new function was added to set/clear (currently only used
#to clear) the Prevent/Allow Medium Removal flag.
#   
--- changer-src/scsi-changer-driver.c.orig  Tue Oct 24 19:21:15 2000
+++ changer-src/scsi-changer-driver.c   Sat Feb 17 21:23:08 2001
@@ -92,6 +92,7 @@
 int GenericFree();
 int TapeStatus();   /* Is the tape loaded ? */
 int DLT4000Eject(char *Device, int type);
+int EXB8505Eject(char *Device, int type);
 int GenericEject(char *Device, int type);
 int GenericClean(char *Device); /* Does the tape need a clean */
 int GenericBarCode(int DeviceFD);   /* Do we have Barcode reader support 
*/
@@ -225,6 +226,30 @@
 EXB120BarCode,
 GenericSearch,
 EXB120SenseHandler}},
+  {"EXB-440",   
+"Exabyte Robot [EXB-440]",
+   {GenericMove,
+GenericElementStatus,
+GenericResetStatus,
+GenericFree,
+GenericEject,
+GenericClean,
+GenericRewind,
+EXB120BarCode,
+GenericSearch,
+EXB10eSenseHandler}},
+  {"EXB-480",   
+"Exabyte Robot [EXB-480]",
+   {GenericMove,
+GenericElementStatus,
+GenericResetStatus,
+GenericFree,
+GenericEject,
+GenericClean,
+GenericRewind,
+EXB120BarCode,
+GenericSearch,
+EXB10eSenseHandler}},
   {"EXB-85058HE-",
"Exabyte Tape [EXB-85058HE-]",
{DoNothing,
@@ -237,6 +262,19 @@
 GenericBarCode,
 GenericSearch,
 EXB85058SenseHandler}},
+  {"EXB-85058SQANXR1",
+   "Exabyte Tape [EXB-85058SQANXR1]",
+   {DoNothing,
+DoNothing,
+DoNothing,
+DoNothing,
+/* DLT4000Eject, */
+EXB8505Eject,
+GenericClean,
+GenericRewind,
+GenericBarCode,
+GenericSearch,
+EXB85058SenseHandler}},
 /* Tandberg Devices */
   {"TDS 1420",  
"Tandberg Robot (TDS 1420)",
@@ -364,9 +402,15 @@
   {0x39,
"EXB-85058HE-",
EXB85058HEPage39},
+  {0x39,
+   "EXB-85058SQANXR1",
+   EXB85058HEPage39},
   {0x3c,
"EXB-85058HE-",
EXB85058HEPage3c},
+  {0x3c,
+   "EXB-85058SQANXR1",
+   EXB85058HEPage3c},
   {0, NULL, NULL}
 };
 
@@ -512,13 +556,13 @@
 
 int drive_loaded(int fd, int drivenum)
 {
-
   dbprintf(("## START drive_loaded\n"));
   dbprintf(("%-20s : fd %d drivenum %d \n", "drive_loaded", fd, drivenum));
 
   if (pChangerDev == NULL)
 {
   dbprintf(("%-20s : pChangerCtl == NULL\n", "drive_loaded"));
+  dbprintf(("## STOP  drive_loaded: -1\n"));
   return(-1);
 }
 
@@ -526,12 +570,18 @@
   {
   if (pChangerDev->functions->function[CHG_STATUS](fd, 1) != 0)
   {
+ dbprintf(("## STOP  drive_loaded: -1\n"));
   return(-1);
   }
   }
 
   if (pDTE[drivenum].status == 'E')
+{
+  dbprintf(("## STOP  drive_loaded: 0\n"));
   return(0);
+}
+
+  dbprintf(("## STOP  drive_loaded: 1\n"));
   return(1);
 }
 
@@ -822,8