samba via nfs = bad

Paul M paul-clug at mansfield.co.uk
Tue Nov 4 15:52:11 CET 2008


Colin Johnston wrote:
> and make sure you monitor the mirror status :)

this is as trivial as something like this...

#!/bin/bash

for S in server1 server2 ... serverN
do
	ssh $S "cat /proc/mdstat" | grep F > /dev/null
	if [ $? -eq 0 ] ; then
		echo "Server $S has a mirror problem" | mail -s "mirror report"
xyz at example.com
	fi
done


typed blindly, not debugged or tested.

cron it up, watch for errors.


whilst you're at it, for each disk, also do
	smartctl --all /dev/sda | grep Reallocated_Sector_Ct

and look for numbers creeping up, it's the first sign of a failing disk IME.




More information about the CLUG mailing list