tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Richard Bemrose <rb237 () phy ! cam ! ac ! uk>
To: tru64-unix-managers
Subject: SUMMARY: Scratch disk policy
Date: Fri, 29 Jan 1999 17:51:39 +0000	[thread overview]
Message-ID: <96079034715970.tru64-unix-managers.marc@archive.invalid> (raw)

Hello fellow osf managers,

I apologies for the delay in posting this summary while I evaluated
the various scripts/ideas kindly submitted. I first must thank the
following people:

 "Alexander, Robert" <Robert_Alexander@Tupmail.com>
 "Partin.Kevin" <KPartin@hou.mdc.com>
 "T. S. Horsnell" <tsh@mrc-lmb.cam.ac.uk>
 Lucio Chiappetti <lucio@ifctr.mi.cnr.it>
 Phil Farrell <farrell@pangea.Stanford.EDU>
 Ralph Rodriguez <rrodrigu@ssc.wisc.edu>
 Serguei Patchkovskii <patchkov@ucalgary.ca>
 Tom Webster <webster@ssdpdc.lgb.cal.boeing.com>
 alan@nabeth.cxo.dec.com
 esci <esci@fastlane.net>

In my original posting I asked for advice on scratch disk policies. The
question arose from [certain] users defeating our simply 'find and remove'
command: 
	/sbin/find /u/scr1/ -type f -atime +14 -xdev -exec \rm -f {} \;

I received a number of suggested using various combinations of atime (last
accessed), ctime (last changed) and mtime (last modified) to identify
files to be removed from the scratch disk. All of which can be defeated. 
And any solution will be CPU, I/O or storage space intensive.

I was particular pleased with two scripts submitted by fellow admins: 
'cleanup.pl' by Serguei Patchkovskii <patchkov@ucalgary.ca> (attached to
the bottom of this poster) and 'prunedisk' by Phil Farrell
<farrell@pangea.Stanford.EDU> which can be obtained by contacting the
author. 

Quoting from the 'cleanup.pl' documentation:
"Subdirectories are removed recursively if all of the files in the
subdirectories have all of atime, mtime and ctime older than $deadTime.
Notification e-mail is sent to the file owner. For directories with files
older than $warnTime, a warning e-mail is sent."

Meanwhile, from the man page of 'prunedisk':
"Prunedisk prunes specified directory tree, removing inactive files and
directories older than specified age, based on private database of file
ages that it maintains."

And, Phil comments "[the] script had the added benefit that it avoided
problems with incorrect deletion of files restored from tar tapes.  With
the 'find' command, I would delete files that had not been modified within
15 days.  But when you restore files from a tar tape, they are given their
original modification times, which are always more than 15 days ago.  So
"find" would delete them the next night.  My private database does not use
any of the time stamps stored with the file and deletes these files
instead 15 days after they are first seen on the disk." 

In addition, Lucio Chiappetti <lucio@ifctr.mi.cnr.it> adopted an intricate
policy whereby users ran a specific program which records the duration and
location of directories created. Then a cron job changes ownership of all
files to root on a frequent basis followed by another cron job removing
the directories after the specified duration. Meanwhile Tom Webster
<webster@ssdpdc.lgb.cal.boeing.com> has adopted to be vigilant and "come
down heavy" on all users who abuse the scratch disk. 

Once again, I thank everybody who replied and I hope this poster gives one
or two ideas to others.

-- cut --
begin 755 cleanup.pl.gz
M'XL(",[?L38"`V-L96%N=7`N<&P`Y5IM;]M&$OXL_8J)K%@22DM.VCNT3A,X
M<-I#@*87Q&G[X7HH5N1*XH7D*ES2KL[Q?[^9V1<N*<J.6^!PP"DO$G=W9N=M
MGYG=Y=&CQ:J4\EJ4<K%,B\56EMGP:'@$TXL9//GFFZ\C_.\;N)3ENI8IO!55
MO/F@KO2'-(U@:Y_.ZUAD:U'NYK%@XO>;5(..RW1;02P*6$I(4AU79;JL*YD`
M39GM8%NJJS3!YVHCJC.DPX^8P8\*5E("LH@WHES3>%5"6FEB8GBDBICN5$&T
M$@J5IX7(#`?\Y#))!<1*5\^H312)Z5K.X&VI4$<05<,()\I%(B-(BSBKD[18
M0R;%%7U7I$@NM19KZ;FG127B"K]X[J5*=J!6_-NH/&<;O,S6JDRK37[&C_#:
M#*_4]B235S)#94H95ZK<P51HM*769`D%QQ<X>_'*]<Y`9*S9*LVD!I4E*#X:
MK(!Q(D7R/LTEH/>@E+FZDLD<OD=C(4EK/-$;&O1T03016@7D22[2C`R@95'1
MY"2BNBZ0A`:2"5`U41!]FF]EP=;AJ40VIU;Z=UDOG3(I3AE(@]]Q7>KTBMR=
MKE@N:RL6C_D:P^@VDXVXDFZXJ%C@O&)=T><Q_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MB:6F.*IZ8A#=31%W4J%'P-J\,=[@#LMEWG2#'KL-;OTJ8D5\QC=2AZG^R-P6
M5.867V-^M^\CF'<G2.I<Y3AW9-Y.2*OFA02^HIO"=V]>OOX!B]-/_*81O\O`
MSAI!ST%V68$?YK=+IB!F/M9X[G;.<@\X?5>6]%:#?64E9'/@`J?S/D)X*&`0
MS5=;YM@A?"O"CFB_$>%/'5C]B[__^/WKOT4CW#\T+P3TWE:&`YS,Y_9M`13A
M6\/I!;8:U<TS.<L%[M0-Q^"/-VK+IS5'0W]E7.9DDWJ++D-U84OZ]F\`_%+8
M9E2K!(R;FXB^ESD<05,SW0YU)N5V^N5I4%D>.;5>V#</O)#NEN>/2"4Q?.&F
H[PSP?ED!%PN$ARNF$_UP/FKD/K<76HURQTW)R]7\?P`=`3'L62<``"4Q
`
end
-- cut --

Regards,
Rich

 /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
/_/       Richard A Bemrose      /_\  Polymers and Colloids Group \_\
/_/  email: rb237@phy.cam.ac.uk  /_\     Cavendish  Laboratory    \_\  
/_/    Tel: +44 (0)1223 337 267  /_\    University of Cambridge   \_\   
/_/    Fax: +44 (0)1223 337 000  /_\        Madingley  Road       \_\   
/_/ Mobile: +44 (0)410  168 873  / \    Cambridge,  CB3 0HE, UK   \_\   
 /_/_/_/_/_/_/  http://www.poco.phy.cam.ac.uk/~rb237 \_\_\_\_\_\_\_\
             "Life is everything and nothing all at once"
              -- Billy Corgan, Smashing Pumpkins

                 reply	other threads:[~1999-01-29 17:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox