Rachel Carson NAS
There is a network attached storage server running on the Rachel Carson that is there as a place to write Greensea logs so they don't fill up the machine bubinga, but we have them for troubleshooting and diagnostics.
Web Portal
There is a web portal that you can use to manage the NAS and you can reach it from either of the two Network Interface Cards (NIC) that are on the server.
There is an admin and a Ventana login that can be used to manage the device.
Mounts
There is a share on the NAS named 'VentanaLogs' and a subdirectory called 'mbari_logs' where the log files are copied and it needs to be mounted to bubinga before the copying can work. Under the root account on bubinga, there is a cron job that looks like:
* * * * * /usr/local/bin/chkNasMount.sh >/dev/null 2>&1
This runs a script every minute which looks to see if the NAS file share is mounted on bubinga. The chkNasMount.sh script looks like this:
#!/bin/bash
if ! grep -qs '134.89.23.21:VentanaLogs' /proc/mounts; then
mount -t nfs 134.89.23.21:VentanaLogs /mnt/mynfs
fi
Then, under the ventana account on bubinga, there is a cron job setup to copy off the logs. The cron entry looks like this:
00 18 * * * /home/ventana/lcmlogs2archive.sh >> /home/ventana/log_files/nightly_cron_output.txt
And the contents of the lcmlogs2archive.sh script are:
#!/bin/bash
### move lcm logger and console files from the ventana ~/log_files
### to the NAS VentanaLogs/mbari_logs directory
### 28Oct2015 r.schramm
### TODO: needs to deal better with mount point not being established....
if grep -qs '/mnt/mynfs' /proc/mounts; then
echo "Ventana NAS is mounted."
else
echo "Ventana NAS is not mounted - do nothing."
exit 1
fi
## if I want to organize by year...
#YEAR=`date +%Y`
#mkdir -p /mnt/mynfs/mbari_logs/$YEAR
if grep -qs '/mnt/mynfs' /proc/mounts; then
cd /home/ventana/log_files
#files NOT newer than today
#find . -name "lcmlog*" -daystart -type f ! -newermt `date +%Y-%m-%d` -exec cp -p {} /mnt/mynfs/mbari_logs \;
#find . -name "console*" -daystart -type f ! -newermt `date +%Y-%m-%d` -exec cp -p {} /mnt/mynfs/mbari_logs \;
find . -name "lcmlog*" -daystart -type f ! -newermt `date +%Y-%m-%d` -exec mv {} /mnt/mynfs/mbari_logs \;
find . -name "console*" -daystart -type f ! -newermt `date +%Y-%m-%d` -exec mv {} /mnt/mynfs/mbari_logs \;
#chmod 444 /mnt/mynfs/mbari_logs/*
fi
exit 0