From: Artem B. <ap...@ng...> - 2008-11-06 12:15:22
|
g++ -DHAVE_CONFIG_H -I. -DSMARTMONTOOLS_SYSCONFDIR='"/usr/local/etc"' -DBUILD_INFO='"(local build)"' -g -O2 -Wall -W -MT os_linux.o -MD -MP -MF .deps/os_linux.Tpo -c -o os_linux.o os_linux.cpp os_linux.cpp: In function ‘int areca_command_interface(int, int, smart_command_set, int, char*)’: os_linux.cpp:1805: error: ‘sInq’ was not declared in this scope --- os_linux.cpp 2008-11-06 17:42:13.000000000 +0600 +++ os_linux.cpp.new 2008-11-06 17:36:45.000000000 +0600 @@ -1689,3 +1689,3 @@ { - //dumpdata(&sBuf.ioctldatabuffer[0], sBuf.srbioctl.Length); + dumpdata(&sBuf.ioctldatabuffer[0], sBuf.srbioctl.Length); memcpy(ptr, &sBuf.ioctldatabuffer[0], sBuf.srbioctl.Length); @@ -1803,3 +1803,3 @@ // For debugging -#if 0 +#if 1 memset(sInq, 0, sizeof(sInq)); Bruce Allen пишет: > Hi Artem, > > I can't reproduce this problem. Here is the result of running the > script below on my system (after changing /dev/sg1 to /dev/sg2 and > fixing the smartctl path): > > d09:~# ./testing.sh > OK=101 failures=0 > > Here is my next suggestion: if you look in os_linux.cpp, then you will > find some commented-out debugging code that looks like this: > > #if 0 > memset(sInq, 0, sizeof(sInq)); > scsiStdInquiry(fd, (unsigned char *)sInq, (int)sizeof(sInq)); > dumpdata((unsigned char *)sInq, sizeof(sInq)); > #endif > > > un-comment this code by changing it to #if 1, and uncomment the line > that reads: > > //dumpdata(&sBuf.ioctldatabuffer[0], sBuf.srbioctl.Length); > > then run your script below, this time redirecting stdout into a file. > This might help to sort out what is wrong. > > Cheers, > Bruce > > > On Wed, 5 Nov 2008, Artem Bokhan wrote: > >> Looks like no changes >> >> grep -i error /var/log/syslog >> Nov 5 19:22:07 smartd[24598]: REPORT-IOCTL: Device=/dev/sg1 >> Command=SMART READ LOG returned -1 errno=5 [Input/output error] >> Nov 5 19:22:07 smartd[24598]: Error SMART Error Log Read failed: >> Input/output error >> Nov 5 19:22:07 smartd[24598]: Device: /dev/sg1 [areca_02], Read SMART >> Error Log Failed >> >> >> Here is a small script for testing and a result ) >> >> OK=0 && failures=0 && for ((i=0 ; i<=100 ; i++)) ; do >> /data/soft/smart/smartctl -d areca,1 -a /dev/sg1 > /dev/null && let >> "OK+=1" || let "failures+=1"; done && echo "OK=$OK failures=$failures" >> >> OK=95 failures=6 >> >> /data/soft/smart/smartctl -V >> smartctl 5.39 2008-08-23 19:56 [x86_64-unknown-linux-gnu] (local build) >> Copyright (C) 2002-8 by Bruce Allen, >> http://smartmontools.sourceforge.net >> >> /data/soft/smart/smartd -V >> smartd 5.39 2008-08-23 19:56 [x86_64-unknown-linux-gnu] (local build) >> Copyright (C) 2002-8 by Bruce Allen, >> http://smartmontools.sourceforge.net >> >> >> >> >> >> Bruce Allen ÿÿÿÿÿÿÿÿÿÿ: >>> Artem, >>> >>> Thank you. Christian has been leading a structural redesign/rewrite of >>> smartmontools, which made it into the production code just after the >>> Areca interface was added. So we are trying to understand if that is >>> the source of your problems! >>> >>> Cheers, >>> Bruce >>> >>> >>> On Wed, 5 Nov 2008, Artem Bokhan wrote: >>> >>>> Bruce Allen ÿÿÿÿÿÿÿÿÿÿ: >>>>> Hi Artem, >>>>> >>>>> It looks as if you are using code dated (approximately) 2008/10/21. >>>>> Could you try reverting to an earlier smartmontools version to see if >>>>> the problems go away? I am running code from smartmontools on August >>>>> 5th. How about trying to build a version from (say) August 23rd as >>>>> suggested by Christian below? >>>> I'll try, need some time to check. >>>> >>>>> >>>>> Cheers, >>>>> Bruce >>>>> >>>>> >>>>> >>>>> On Wed, 5 Nov 2008, Artem Bokhan wrote: >>>>> >>>>>> From first message: >>>>>> >>>>>> smartd 5.39 2008-10-20 21:15 [x86_64-unknown-linux-gnu] (local >>>>>> build) >>>>>> Copyright (C) 2002-8 by Bruce Allen, >>>>>> http://smartmontools.sourceforge.net >>>>>> >>>>>> smartd comes with ABSOLUTELY NO WARRANTY. This is >>>>>> free software, and you are welcome to redistribute it >>>>>> under the terms of the GNU General Public License >>>>>> Version 2. See http://www.gnu.org for further details. >>>>>> >>>>>> CVS version IDs of files used to build this code are: >>>>>> Module: atacmdnames.cpp revision: 1.17 date: 2008/03/29 >>>>>> uses: atacmdnames.h revision: 1.6 date: 2008/03/04 >>>>>> Module: atacmds.cpp revision: 1.208 date: 2008/10/11 >>>>>> uses: atacmds.h revision: 1.102 date: 2008/10/11 >>>>>> uses: configure.in revision: 1.145 date: 2008/10/13 >>>>>> uses: extern.h revision: 1.59 date: 2008/08/23 >>>>>> uses: int64.h revision: 1.17 date: 2008/03/04 >>>>>> uses: scsiata.h revision: 1.6 date: 2008/07/25 >>>>>> uses: utility.h revision: 1.65 date: 2008/09/17 >>>>>> Module: knowndrives.cpp revision: 1.184 date: 2008/10/20 >>>>>> uses: atacmds.h revision: 1.102 date: 2008/10/11 >>>>>> uses: configure.in revision: 1.145 date: 2008/10/13 >>>>>> uses: extern.h revision: 1.59 date: 2008/08/23 >>>>>> uses: int64.h revision: 1.17 date: 2008/03/04 >>>>>> uses: knowndrives.h revision: 1.22 date: 2008/10/08 >>>>>> uses: utility.h revision: 1.65 date: 2008/09/17 >>>>>> Module: os_linux.cpp revision: 1.122 date: 2008/10/03 >>>>>> uses: atacmds.h revision: 1.102 date: 2008/10/11 >>>>>> uses: configure.in revision: 1.145 date: 2008/10/13 >>>>>> uses: int64.h revision: 1.17 date: 2008/03/04 >>>>>> uses: os_linux.h revision: 1.27 date: 2008/03/04 >>>>>> uses: scsicmds.h revision: 1.67 date: 2008/07/25 >>>>>> uses: utility.h revision: 1.65 date: 2008/09/17 >>>>>> Module: scsicmds.cpp revision: 1.97 date: 2008/07/25 >>>>>> uses: configure.in revision: 1.145 date: 2008/10/13 >>>>>> uses: extern.h revision: 1.59 date: 2008/08/23 >>>>>> uses: int64.h revision: 1.17 date: 2008/03/04 >>>>>> uses: scsicmds.h revision: 1.67 date: 2008/07/25 >>>>>> uses: utility.h revision: 1.65 date: 2008/09/17 >>>>>> Module: smartd.cpp revision: 1.430 date: 2008/10/13 >>>>>> uses: atacmds.h revision: 1.102 date: 2008/10/11 >>>>>> uses: configure.in revision: 1.145 date: 2008/10/13 >>>>>> uses: extern.h revision: 1.59 date: 2008/08/23 >>>>>> uses: int64.h revision: 1.17 date: 2008/03/04 >>>>>> uses: knowndrives.h revision: 1.22 date: 2008/10/08 >>>>>> uses: scsicmds.h revision: 1.67 date: 2008/07/25 >>>>>> uses: utility.h revision: 1.65 date: 2008/09/17 >>>>>> Module: utility.cpp revision: 1.74 date: 2008/09/13 >>>>>> uses: configure.in revision: 1.145 date: 2008/10/13 >>>>>> uses: int64.h revision: 1.17 date: 2008/03/04 >>>>>> uses: utility.h revision: 1.65 date: 2008/09/17 >>>>>> >>>>>> smartmontools release 5.39 dated 2008/03/10 at 10:44:07 GMT >>>>>> smartmontools build host: x86_64-unknown-linux-gnu >>>>>> smartmontools build configured: 2008/10/21 10:38:24 UTC >>>>>> smartd compile dated Oct 21 2008 at 17:38:32 >>>>>> smartmontools configure arguments: [no arguments given] >>>>>> >>>>>> >>>>>> Bruce Allen ÿÿÿÿÿÿÿÿÿÿ: >>>>>>> Bokhan, what code version are you using (smartd -V will show this)? >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, 5 Nov 2008, Christian Franke wrote: >>>>>>> >>>>>>> >>>>>>>> Hi All, >>>>>>>> >>>>>>>> Bruce Allen wrote: >>>>>>>> >>>>>>>>> ... >>>>>>>>> Christian: I wonder if this is associated with the fact that the >>>>>>>>> ata_command_interface() can return +1 in the case of a SMART >>>>>>>>> STATUS >>>>>>>>> CHECK failure (not just 0 and -1 as for the other commands). >>>>>>>>> >>>>>>>>> >>>>>>>> Yes, possibly. The SMART STATUS CHECK command is the only SMART >>>>>>>> command >>>>>>>> where the ATA output registers are relevant. >>>>>>>> >>>>>>>> There might be a problem in >>>>>>>> - the Areca ioctl itself (not returning ATA registers properly), >>>>>>>> - the STATUS_CHECK return value os_linux.cpp Areca code, >>>>>>>> - the (device independent) mapping between 'return value' and 'ATA >>>>>>>> registers' in the adapter routines of the new interface. >>>>>>>> The latter is done twice because areca code still uses the >>>>>>>> 'smart_command_set' interface. >>>>>>>> >>>>>>>> Here are update commands for two CVS snapshots that may help to >>>>>>>> track >>>>>>>> down a possible regression introduced by my changes: >>>>>>>> >>>>>>>> Just before checkin of new interface modules >>>>>>>> (os_linux.cpp 1.115): >>>>>>>> >>>>>>>> $ cvs up -D '2008-07-25 21:00 UTC' >>>>>>>> >>>>>>>> >>>>>>>> Just before migration of os_linux.cpp to new interface >>>>>>>> (os_linux.cpp 1.116): >>>>>>>> >>>>>>>> $ cvs up -D '2008-08-23 20:00 UTC' >>>>>>>> >>>>>>>> >>>>>>>> After cvs update, make sure to re-run ./autogen.sh before >>>>>>>> ./configure. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Christian >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------------------- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>>>>>> challenge >>>>>>>> Build the coolest Linux based applications with Moblin SDK & win >>>>>>>> great prizes >>>>>>>> Grand prize is a trip for two to an Open Source event anywhere in >>>>>>>> the world >>>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>>>>> _______________________________________________ >>>>>>>> Smartmontools-support mailing list >>>>>>>> Sma...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/smartmontools-support >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>>>>> challenge >>>>>>> Build the coolest Linux based applications with Moblin SDK & win >>>>>>> great prizes >>>>>>> Grand prize is a trip for two to an Open Source event anywhere in >>>>>>> the world >>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>>>> _______________________________________________ >>>>>>> Smartmontools-support mailing list >>>>>>> Sma...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/smartmontools-support >>>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------- >>>>>> >>>>>> >>>>>> >>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>>>> challenge >>>>>> Build the coolest Linux based applications with Moblin SDK & win >>>>>> great prizes >>>>>> Grand prize is a trip for two to an Open Source event anywhere in >>>>>> the >>>>>> world >>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>>> _______________________________________________ >>>>>> Smartmontools-support mailing list >>>>>> Sma...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/smartmontools-support >>>>>> >>>> >>>> >>>> ------------------------------------------------------------------------- >>>> >>>> >>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>> challenge >>>> Build the coolest Linux based applications with Moblin SDK & win >>>> great prizes >>>> Grand prize is a trip for two to an Open Source event anywhere in the >>>> world >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>> _______________________________________________ >>>> Smartmontools-support mailing list >>>> Sma...@li... >>>> https://lists.sourceforge.net/lists/listinfo/smartmontools-support >>>> >> >> >> ------------------------------------------------------------------------- >> >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Smartmontools-support mailing list >> Sma...@li... >> https://lists.sourceforge.net/lists/listinfo/smartmontools-support >> |