FreeBSD Port: sysutils/smartmontools (daily_status_smart_devices
with 3ware controller)
Dmitry Morozovsky
marck at rinet.ru
Sat Feb 6 12:27:33 UTC 2010
On Sat, 6 Feb 2010, Dmitry Morozovsky wrote:
DM> PP> > I am trying to obtain a daily smart status report on one of my servers
DM> PP> > which uses a 3ware controller. To access these devices from
DM>
DM> Please try the patch attached. Note that you have to specify your 3ware disks
DM> as
DM>
DM> daily_status_smart_devices="twa0,0 twa0,1 twa0,2"
DM>
DM> (controller device name instead of "3ware")
DM>
DM> In no objection case I'll make this patch part of port distribution.
Grr, patch was lost. Resent.
--
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: marck at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/smartmontools/Makefile,v
retrieving revision 1.46
diff -u -r1.46 Makefile
--- Makefile 4 Feb 2010 13:22:00 -0000 1.46
+++ Makefile 6 Feb 2010 12:20:14 -0000
@@ -7,7 +7,7 @@
PORTNAME= smartmontools
PORTVERSION= 5.39
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= SF
Index: files/smart.in
===================================================================
RCS file: /home/ncvs/ports/sysutils/smartmontools/files/smart.in,v
retrieving revision 1.6
diff -u -r1.6 smart.in
--- files/smart.in 4 Feb 2010 13:22:00 -0000 1.6
+++ files/smart.in 6 Feb 2010 12:20:14 -0000
@@ -37,11 +37,18 @@
[Yy][Ee][Ss])
cd /dev
for device in ${daily_status_smart_devices}; do
+ case ${device} in
+ twa*) devflags="-d3ware,${device##twa[0-9]*,}"
+ device="${device%%,[0-9]*}"
+ ;;
+ *) devflags=""
+ ;;
+ esac
if [ -e ${device} ]; then
echo
echo "Checking health of ${device}:"
echo
- ${smartctl} ${daily_status_smartctl_flags} /dev/${device} > "${tmpfile}"
+ ${smartctl} ${devflags} ${daily_status_smartctl_flags} /dev/${device} > "${tmpfile}"
status=$?
if [ $((status & 3)) -ne 0 ]; then
rc=2
More information about the freebsd-ports
mailing list