These one do the same thing and gives the space used per image.
I use it in 6.0.
#!/bin/bash
[ -z "$1" ] && echo "usage: `basename $0` STAGING_AREAS" >&2 && exit 1
for i in $*; do
cd $i
ls | cut -d_ -f 1,2 | sort | uniq | while read A; do echo $A `du -sc $A* |
grep total` `ls ${A}*F1.ds* 2>/dev/null > /dev/null && echo flushed `; done |
sort -nk 2
done
Pedro
________________________________
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Ed Wilts
Sent: quarta-feira, 4 de fevereiro de 2009 20:39
To: Matthew Stier
Cc: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Clearing DSSU's.
This script should help (for 6.5.*):
#!/bin/sh
usage() {
echo "usage: `basename $0` storage_unit_path"
}
if [ $# -ne 1 ]
then
usage
exit 1
fi
cd $1
for BACKUP_ID in `ls -1 *.info *.img | sed -e 's/_C.*$//' | sort | uniq`; do
copies=`bpimagelist -backupid $BACKUP_ID 2>/dev/null | awk '/^IMAGE/
{print $21}'`
if [ -z "$copies" ]
then
echo $BACKUP_ID not found in catalog
else
if [ $copies -eq 1 ]
then
echo "$BACKUP_ID waiting (copies=$copies)"
else
echo "$BACKUP_ID destaged (copies=$copies)"
fi
fi
done
It's self-documenting :-)
.../Ed
On Mon, Jan 26, 2009 at 3:24 PM, Matthew Stier <Matthew.Stier AT us.fujitsu DOT
com> wrote:
Background: Solaris 10 master/media server with several filesystems
mounted from SAN to act as DSSU's. Backups are done using cron initiated
backup scripts, which call the applicable policy. Whe the policy is completed,
another script dumps each DSSU to tape.
Issue: Need to rebuild the filesystems hosting the DSSU's. Since these
tapes are already backed up to tape, what do I need to do to purge all the
images?
Ed Wilts, RHCE, BCFP, BCSD, SCSP, SCSE
ewilts AT ewilts DOT org
AVISO: A informação contida neste e-mail, bem como em qualquer de seus anexos,
é CONFIDENCIAL e destinada ao uso exclusivo do(s) destinatário(s) acima
referido(s), podendo conter informações sigilosas e/ou legalmente protegidas.
Caso você não seja o destinatário desta mensagem, informamos que qualquer
divulgação, distribuição ou cópia deste e-mail e/ou de qualquer de seus anexos
é absolutamente proibida. Solicitamos que o remetente seja comunicado
imediatamente, respondendo esta mensagem, e que o original desta mensagem e de
seus anexos, bem como toda e qualquer cópia e/ou impressão realizada a partir
destes, sejam permanentemente apagados e/ou destruídos. Informações adicionais
sobre nossa empresa podem ser obtidas no site http://sobre.uol.com.br/.
NOTICE: The information contained in this e-mail and any attachments thereto is
CONFIDENTIAL and is intended only for use by the recipient named herein and may
contain legally privileged and/or secret information.
If you are not the e-mail´s intended recipient, you are hereby notified that
any dissemination, distribution or copy of this e-mail, and/or any attachments
thereto, is strictly prohibited. Please immediately notify the sender replying
to the above mentioned e-mail address, and permanently delete and/or destroy
the original and any copy of this e-mail and/or its attachments, as well as any
printout thereof. Additional information about our company may be obtained
through the site http://www.uol.com.br/ir/.
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|