SUMMARY: Symlinks disappear (preliminary)

From: ROBIN_BROWN@phl.com
Date: Wed Jul 01 1998 - 09:41:09 CDT


I wanted to send a summary of what I will try before leaving for vaction.

Original post:

Sun Managers:

Release: 5.5.1
Kernel architecture: sun4m
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.5.1 Generic 103640-08 March 1997

I created a symlink for /var/adm/sa to a new disk, /disk1/var/adm/sa
in order to have sufficient disk space for sar reports. Everything works
well, however every few days the symlink in the /var/adm directory for sa
disappears.

Possible Solution:

I will change the find command in the /usr/lib/sa/sa2 script on one of my
machines. This script contains a command that removes old sa and sar data
form the /var/adm/sa directory. It was suggested that this might also be
removing the symlink:

find /var/adm/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm {} \;

It was also suggested to run a cron job that checks for the symlink and
e-mails me a message when it disappears, this would give me an indicator of
when it was happening. I have implemented this change on the second box.
If the sa2 script doesn't fix it, perhaps the cron job will help me
pinpoint the actual cause.

Many thanks to these Sun Managers for their suggestions:

   This is slimy, but all I can think of is to have a cron job run
   periodically (say every 20 minutes) to check the existence of the link
   and yell if it disappears. This way, you can at least narrow down the
   time of day. The command would look something like

   /bin/test -L /var/adm/sa || mailx -s "link gone" ROBIN_BROWN < /dev/null

--
Karl Vogel
ASC/YCOA, Wright-Patterson AFB, OH 45433, USA
vogelke@c17mis.region2.wpafb.af.mil

The following line is in /usr/lib/sa/sa2, which is one of sys's cron jobs:

find /var/adm/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm {} \;

That would cause the symlink to be removed after a week. If you changed the directory find searches to '/var/adm/sa/*', that should bypass the symlink and keep it intact.

Sean Ward <sdward@uswest.com>

I'd look for a cron job that deletes (what it thinks are) unnecessary files. Check the contents of /var/spool/cron/crontabs/* and any scripts referenced therein.

Hope this helps,

Ray Brownrigg <ray@mcs.vuw.ac.nz> http://www.mcs.vuw.ac.nz/~ray

Regards, Robin Brown



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:43 CDT