cirno# cat /cfg/cirno/cpustart #!/bin/rc # this file is run if service=cpu # cp this file to /cfg/$sysname/namespace # cd cirno; cp cpustart /cfg/cirno/cpustart echo 'starting /cfg/'$sysname'/cpustart' # 4 instances of cwfs64x are running and each is using # until fsmempercent. This is maxing out the memory. # Hence, limit the max memory to 80% of the total # memory available echo 20 >/env/fsmempercent for (l in monitor cron ddfreader ddfbackup backup ddfhistory) { f=/sys/log/$l test -f $f || touch $f chmod +at $f } ns >/tmp/monitor.ns # these mounts are in namespace too. # mirrored disk for ddf data if(cwfs64x -f /dev/ddf/fscache -C){ mount -c /srv/cwfs-ddf /n/cwfs-ddf # mount -c /srv/cwfs-ddf /n/cwfs-ddf-other other # bind -c /n/cwfs-ddf-other/usr/glenda/tmp /usr/glenda/tmp bind -ac /n/cwfs-ddf/usr/glenda/ddf /usr/glenda/ddf /usr/glenda/bin/rc/ddf/monitor.rc & } if not { echo 'cwfs64x command on the ddf mirror disk failed' } if(cwfs64x -f /dev/sdE3/fscache -C){ mount -c /srv/cwfs-sdE3 /n/cwfs-sdE3 mount -c /srv/cwfs-sdE3 /n/cwfs-sdE3-other other # do not put the /tmp/ mounts here as they will affect # the whole system. Put them in profile when # started from drawterm, so the big /tmp/ will be # available for interactive use and not affect the # system stability. Ensure that no cron jobs require # a big /tmp/ directory. bind -ac /n/cwfs-sdE3/usr/glenda/ddf/generated /usr/glenda/ddf/generated } if not { echo 'cwfs64x command on the ddf backup disk failed' } # put this in a & command to avoid hanging up the cpustart if it fails # venti { # the ip/ipconfig command below is hanging up cpustart # the loopback address is needed for the venti server cat /net/iproute>/tmp/iproute.before; cat /net/ipselftab >/tmp/ipselftab.before; ip/ipconfig -D loopback /dev/null add 127.0.0.1 echo $status cat /net/iproute>/tmp/iproute.after; cat /net/ipselftab >/tmp/ipselftab.after # start venti venti/venti -c /dev/bkp/arenas-st venti/venti -c /dev/bkp/arenas-lt ls /srv # start the vacfs on the latest ddf vac vacfs -h 'tcp!127.0.0.1!17034' -S vac-ddf /usr/glenda/ddf.vac && \ mount -c /srv/vac-ddf /n/vac-ddf }& # system services auth/cron echo 'finished /cfg/'$sysname'/cpustart'