FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9e015d22 authored by Dr Adam Thorn's avatar Dr Adam Thorn
Browse files

Fix new-backup-{zfs,rsnapshot}'s attempt to find the target zpool with most available space

parent 18b85b7e
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ Priority: optional
Section: otherosfs
Maintainer: Frank Lee <rl201@cam.ac.uk>
Architecture: all
Version: 0.9-ch17
Version: 0.9-ch18
Depends: debian-zfs, postgresql, liblockfile-simple-perl, libdbi-perl, libjson-perl, libzfs-perl-chem, libnet-openssh-perl, libdbd-pg-perl, mbuffer
Description: a backup system using ZFS
Ported (well, mostly) from FreeBSD to a Sane OS.
......@@ -33,7 +33,7 @@ done
if [ -z $TGT ] ; then
echo No existing ZFS found
# Find emptiest zpool
ZPOOL=`zpool list -Ho name,free | grep -v zroot | sort -rnk2 | head -1 | awk ' { print $1 } '`
ZPOOL=`zfs list -H -oname -S avail -d0 | grep -v zroot | grep -v $SOURCE | head -n1`
TGT=$ZPOOL/$FQDN
echo Using $ZPOOL
fi
......
......@@ -29,7 +29,7 @@ done
if [ -z $TGT ] ; then
echo No existing ZFS found
# Find emptiest zpool
ZPOOL=`zpool list -Ho name,free | grep -v zroot | sort -rnk2 | head -1 | awk ' { print $1 } '`
ZPOOL=`zfs list -H -oname -S avail -d0 | grep -v zroot | grep -v $SOURCE | head -n1`
TGT=$ZPOOL/$FQDN
echo Using $ZPOOL
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment