PDA

View Full Version : Solaris server w/ zfs holding disk?



wisti
September 5th, 2006, 07:14 PM
I have a Solaris 10 backup server with a zfs based holding disk. If I point to a ufs based holding disk/directory, it works fine with amanda-2.5.1.

It worked fine with amanda-2.5.0p2, but tonight when I upgraded to amanda-2.5.1, it now says "WARNING: holding disk /amanda/backups: only 0 kB free, using nothing". Did something change in the code to check free space on the holding disk(s)? I am using sparcv9 64-bit binaries built with Sun's Forte compiler.

Is there something I can do to try and debug this issue?

paddy
September 6th, 2006, 09:22 AM
Hi wisti,

What is your holding disk definition in the amanda.conf? What is the value of
"use" parameter?

What is the output of statfs on the zfs filesystem? Can you check what
does STATFS_AVAIL get defined as in common-src/statfs.c in your build?

What version of 2.5.1 are you using? released version? There was a bug in
2.5.1b2 in the SCALE macro.

Thanks,
Paddy

wisti
September 6th, 2006, 10:00 AM
Here is my holdingdisk def from amanda.conf:

holdingdisk hd1 {
comment "main holding disk"
directory "/amanda/backups"
use -1 Mb # was "use -15Mb" before
chunksize 512Mb
}

I tried to make statfs in common-src and it dies with:

/bin/bash ../libtool --tag=CC --mode=link /opt/SUNWspro/bin/cc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -xcode=pic32 -xtarget=ultra -xarch=v9 -I/usr/include -I/usr/local/include -I/usr/sfw/include -xcode=pic32 -xtarget=ultra -xarch=v9 -R/usr/local/lib/sparcv9 -L/usr/local/lib/sparcv9 -R/usr/openwin/lib/sparcv9 -L/usr/openwin/lib/sparcv9 -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/local/lib -o statfs statfs.test.o alloc.o clock.o debug.o error.o util.o match.o file.o -lgen -lm -lreadline -ltermcap -lsocket -lnsl -lresolv -lintl
/opt/SUNWspro/bin/cc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -xcode=pic32 -xtarget=ultra -xarch=v9 -I/usr/include -I/usr/local/include -I/usr/sfw/include -xcode=pic32 -xtarget=ultra -xarch=v9 -o statfs statfs.test.o alloc.o clock.o debug.o error.o util.o match.o file.o -L/usr/local/lib/sparcv9 -L/usr/openwin/lib/sparcv9 -L/usr/sfw/lib -L/usr/local/lib -lgen -lm -lreadline -ltermcap -lsocket -lnsl -lresolv -lintl -R/usr/local/lib/sparcv9 -R/usr/openwin/lib/sparcv9 -R/usr/sfw/lib
Undefined first referenced
symbol in file
free_sl util.o
duplicate_sl util.o
ld: fatal: Symbol referencing errors. No output written to statfs


Here's the output of a sample zfs filesystem's statfs (from v 2.5.0p2):

# ./statfs /zfs/maggie2
statfs (SVR4 (Irix-5+, Solaris-2, Linux glibc 2.1))
name total free avail files ffree favail
------------------------------ ------- ------- ------- ------ ------ ------
/zfs/maggie2 137909730 137909669 137909669 275819347 275819338 275819338

So, I'm guessing the inability to build statfs is the same issue that I have trying to use a zfs filesystem for a holding disk.

I'm not sure I understand what you're asking on the statfs.c query.

I am using the release version of 2.5.1.

paddy
September 6th, 2006, 10:04 AM
I agree. Inability to build statfs is the problem. Please check which STATFS macros get defined during configure (STATFS_SVR4, HAVE_SYS_STATVFS_H, ...)

Please check the STATFS_AVAIL macro definition for zfs.

Any patches that fix the problem are welcome :-)

Paddy

wisti
January 21st, 2007, 02:54 PM
I had to add .libs/sl.o after file.o but before the LDFLAGS to get it to compile. But I still don't get correct output from statfs:

./statfs /zfs/maggie2
eric password on maggie:
statfs (SVR4 (Irix-5+, Solaris-2, Linux glibc 2.1))
name total free avail files ffree favail
------------------------------ ------- ------- ------- ------ ------ ------
/zfs/maggie2 0 0 0 272241717 272241708 272241708

All zeros for total free and avail... It would appear that STATFS_SVR4 is selected. What is needed to figure out where this is failing? I am not a programmer, so I'm not too sure what to be looking for.

martineau
February 9th, 2007, 07:51 AM
wisti,

Have you tried the patch I posted on sourceforge?
I would like to know if it works?
I attach the patch.

wisti
February 10th, 2007, 07:30 PM
With the patch, I can at least get this:

./statfs /zfs/maggie2
statfs (SVR4 (Irix-5+, Solaris-2, Linux glibc 2.1))
name total free avail files ffree favail
---------------------------- -------- -------- -------- ------- ------- -------
/zfs/maggie2 105251844 105251783 105251783 210503575 210503566 210503566

But I still need to add .libs/sl.o just before the -L directives on the compile line to keep this from happening:

/opt/SUNWspro/bin/cc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -xcode=pic32 -xtarget=ultra -xarch=v9 -I/usr/include -I/usr/local/include -I/usr/sfw/include -xcode=pic32 -xtarget=ultra -xarch=v9 -o statfs statfs.test.o alloc.o clock.o debug.o error.o util.o match.o file.o -L/usr/local/lib/sparcv9 -L/usr/openwin/lib/sparcv9 -L/usr/sfw/lib -L/usr/local/lib -lgen -lm -lreadline -ltermcap -lsocket -lnsl -lresolv -lintl -R/usr/local/lib/sparcv9 -R/usr/openwin/lib/sparcv9 -R/usr/sfw/lib
Undefined first referenced
symbol in file
free_sl util.o
duplicate_sl util.o
ld: fatal: Symbol referencing errors. No output written to statfs
gmake: *** [statfs] Error 1

Once my backups finish, I can try to see if it works for the entire amanda system.