From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079034715970.tru64-unix-managers.marc@archive.invalid> From: Richard Bemrose Date: Fri, 29 Jan 1999 17:51:39 +0000 To: tru64-unix-managers Subject: SUMMARY: Scratch disk policy X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079034715970 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" "Partin.Kevin" "T. S. Horsnell" Lucio Chiappetti Phil Farrell Ralph Rodriguez Serguei Patchkovskii Tom Webster alan@nabeth.cxo.dec.com esci 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 (attached to the bottom of this poster) and 'prunedisk' by Phil Farrell 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 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 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;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_'*]@E+FZDLDKTBMR= MKE@N:RL6C_D:P^@VDXVXDFZXJ%C@O&)=T>VR)H:Z,$BWNHHA3I`\F*.[7I-:R MC"".Z;E4RL_.LF>X8-`+:.+';\0ZC:F5_9.N"U5BM#2BZK0B`3=IO(%$T0N(FVP#:P7AN-R$<%PESY M$Z&::W\B_QJ8ZJH9Z<8.'[\T M_O!=MGV(J`+O'`:]8U""&V(I?]^B!AI"Z5$[#%JEP(0L#(81(#9C3^`AQ+\-%>T5X#W:&9HQE/YB.-:)<*[O#@FQ?)$"894="-:=:*T!S5K(WROC(>Z5'W&Q3FB2X!D;6!`: M?]P)YZD/"^Z^]>I8JUKJMM2EK.JRP#I,Y?LAX^4._87N"H.5NNL"U=`H>(#/ M3JLR9YOXZ"*$]9/G_?9RT[;5,+]DINW"U5B'H%W*'),I95?E1QZ0)\2ZFEL/ MR.4Z'R38K<&8RS@`1;AI5GC2U'$&0]J+__ZU;U)"XV1'C7C(A<(XQN"J[._" M(H5._\V@-6U`.#JE/P2L1\"-$>;X:_JO,!"&&7^#Q4P@.I)%X^2"^>./[PWO MY)*96QCJ6>G>#T$7A;&)ZD[C8N(1J0L/#:8^"Q&/3,U55S#^(,I9]`B\T%F^ M7'('G$)0N`=9'$P$U"U,,:[;QQ.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Q=W#;3U5:=SQQ&=&>; MHYVZ=Y5TYA_Q.F%F[J(0)Q`D#RC<4I:\F+2_5N7+D<-3$2W+XRYA&^N>>>.U M#'#`>'MV:E'?=CW0QI7_;?M[C`SL3ZB];%R`%4-PW47C.EXY/%F/N^`/>*7/ MH`_TR1[B_C?"I?%Q!%O<_2#?6!4ZI9OG4A(,5Z0,:E):IXJ^;/"X(`/[XL$X%`PF$P;35/>,\,OA](!QA0@^:,,>O.2X(-6M'6-6"C MB:6F.*IZ8A#=31%W4J%'P-J\,=[@#LMEWG2#'KL-;OTJ8D5\QC=2AZG^R-P6 M5.867V-^M^\CF'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.;5>V#/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