Re: [Veritas-bu] Clearing DSSU's.

2009-02-05 Thread Pedro Moranga Gonçalves
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-boun...@mailman.eng.auburn.edu 
[mailto:veritas-bu-boun...@mailman.eng.auburn.edu] On Behalf Of Ed Wilts
Sent: quarta-feira, 4 de fevereiro de 2009 20:39
To: Matthew Stier
Cc: veritas-bu@mailman.eng.auburn.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.st...@us.fujitsu.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
ewi...@ewilts.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@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


Re: [Veritas-bu] Clearing DSSU's.

2009-02-04 Thread Ed Wilts
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.st...@us.fujitsu.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
ewi...@ewilts.org
___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


Re: [Veritas-bu] Clearing DSSU's.

2009-01-26 Thread Ed Wilts
On Mon, Jan 26, 2009 at 3:24 PM, Matthew Stier matthew.st...@us.fujitsu.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?


What you need to do is for each image on tape, verify that you have 2 copies
and then expire the disk copy.  It's a little bit tricky because you'll be
expiring copy 1.  If there is no copy 2 (say for some reason the image
failed to destage), you've deleted your only copy.  If all goes well, you'll
have an empty DSSU in the end.

You can also do a brute force rm of the disk images but that's a bit hostile
since a restore will attempt to restore from disk rather than tape - you
could expire the disk image if you run into this so that the tape copy is
preferred, but as I said, it's ugly.

.../Ed

Ed Wilts, RHCE, BCFP, BCSD, SCSP, SCSE
ewi...@ewilts.org
___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


Re: [Veritas-bu] Clearing DSSU's.

2009-01-26 Thread Tim Hoke
Here's the general process I think I would follow.

First, stop directing any backups to DSSU until your maintenance is done.
Run bpimmedia to see which images are on your dssu (bpimmedia -disk_stu stu
label
For each of those images, run bpimagelist to see how many copies there are
(bpimagelist -backupid BID)
For those images which don't have a copy on tape, duplicate it (kick off
your de-stage job)
For those images that do have multiple copies, expire the dssu copy
(bpexpdate -backupid BID -d 0 -copy #)
Repeat those steps until you're sure you have all your data protected.

The bottom line though is to make sure that before you go deleting
(expiring) anything, you've got the data protected.  You don't want to
accidentally erase an image that is ONLY on disk.

-Tim

On Mon, Jan 26, 2009 at 3:43 PM, Ed Wilts ewi...@ewilts.org wrote:

 On Mon, Jan 26, 2009 at 3:24 PM, Matthew Stier 
 matthew.st...@us.fujitsu.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?


 What you need to do is for each image on tape, verify that you have 2
 copies and then expire the disk copy.  It's a little bit tricky because
 you'll be expiring copy 1.  If there is no copy 2 (say for some reason the
 image failed to destage), you've deleted your only copy.  If all goes well,
 you'll have an empty DSSU in the end.

 You can also do a brute force rm of the disk images but that's a bit
 hostile since a restore will attempt to restore from disk rather than tape -
 you could expire the disk image if you run into this so that the tape copy
 is preferred, but as I said, it's ugly.

 .../Ed

 Ed Wilts, RHCE, BCFP, BCSD, SCSP, SCSE
 ewi...@ewilts.org


 ___
 Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
 http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu