Testers needed: is smartmontools is 64-bit clean?

Testers needed: is smartmontools is 64-bit clean?

Post by Bruce All » Tue, 01 Jul 2003 00:08:29



Smartmontools is a package for monitoring the SMART status of ATA and
SCSI disks. SMART is a feature built into most modern disks that
continuously monitors the health and operational status of the disk.

Recently, in response to an inquiry from a PPC user, I removed the
"little endian x86 bias" from the code.  Before generating a new
release, I would also like to verify that the code is 64-bit clean.
Could a few linux AXP users from this group please download
smartmontools from CVS and test that it works correctly for them?

To test the code, please see http://smartmontools.sourceforge.net/ for
instructions on how to download the latest code from CVS.  Please do
NOT use one of the existing releases (such as 5.1-14) as it does not
have the latest code base. Then send or post the output of smartctl -a
for any ATA or SCSI devices that you have.  Also, please try running
self-tests with the smartctl -t option, and send or post additional
smartctl -a output when those tests have completed.

Thanks!

Bruce Allen

 
 
 

Testers needed: is smartmontools is 64-bit clean?

Post by Kalle Olavi Niemital » Tue, 01 Jul 2003 01:17:13



> Before generating a new release, I would also like to verify
> that the code is 64-bit clean.

In a few places, the code was trying to print (64-bit) size_t
values with "%d".  The following patches cast these to (32-bit)
int, which ought to be large enough.

--- atacmds.c.~1.107.~  Mon Jun 23 07:55:56 2003

   if (sizeof(minor_str) != sizeof(char *)*(1+MINOR_MAX)){
     pout("Internal error in ataVersionInfo().  minor_str[] size %d\n"
         "is not consistent with value of MINOR_MAX+1 = %d\n",
-        sizeof(minor_str)/sizeof(char *), MINOR_MAX+1);
+        (int) (sizeof(minor_str)/sizeof(char *)), MINOR_MAX+1);
     fflush(NULL);
     abort();
   }
   if (sizeof(actual_ver) != sizeof(int)*(1+MINOR_MAX)){
     pout("Internal error in ataVersionInfo().  actual_ver[] size %d\n"
         "is not consistent with value of MINOR_MAX = %d\n",
-        sizeof(actual_ver)/sizeof(int), MINOR_MAX+1);
+        (int) (sizeof(actual_ver)/sizeof(int)), MINOR_MAX+1);
     fflush(NULL);
     abort();
   }
--- scsicmds.c.~1.49.~  Fri Jun 20 16:24:04 2003

             (DXFER_TO_DEVICE == iop->dxfer_dir) && (iop->dxferp)) {
             int trunc = (iop->dxfer_len > 256) ? 1 : 0;

-            pout("]\n  Outgoing data, len=%d%s:\n", iop->dxfer_len,
+            pout("]\n  Outgoing data, len=%d%s:\n", (int) iop->dxfer_len,
                  (trunc ? " [only first 256 bytes shown]" : ""));
             dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1);

             if (con->reportscsiioctl > 1) {
                 int trunc = (iop->dxfer_len > 256) ? 1 : 0;

-                pout("  Incoming data, len=%d%s:\n", iop->dxfer_len,
+                pout("  Incoming data, len=%d%s:\n", (int) iop->dxfer_len,
                      (trunc ? " [only first 256 bytes shown]" : ""));
                 dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1);

         memcpy(iop->sensep, wrk.buff, len);
         iop->resp_sense_len = len;
         if (con->reportscsiioctl > 1) {
-            pout("  >>> Sense buffer, len=%d:\n", len);
+            pout("  >>> Sense buffer, len=%d:\n", (int) len);
             dStrHex(wrk.buff, len , 1);
         }
     }

Quote:> Then send or post the output of smartctl -a for any ATA or SCSI
> devices that you have.

This is from an Alphastation 500/266 with two SCSI disks.
First, the old noisy one:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
|
| Device: DEC      RZ29B    (C) DEC Version: 0014
| Serial number: 01185069
| Device type: disk
| Local Time is: Sun Jun 29 19:09:04 2003 EEST
| Device does not support SMART
|
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:          0        0         0         0          0          0.000           0
| write:         0        0         0         0          0          0.000           0
| Device does not support Self Test logging

I normally keep the disk spun down.  In this mode, the output
changes to:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
|
| Device: DEC      RZ29B    (C) DEC Version: 0014
| Serial number: 01185069
| Device type: disk
| Local Time is: Sun Jun 29 19:10:50 2003 EEST
| device is NOT READY (media absent, spun down, etc)
| SMART Health Status: OK
|
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:          0        0         0         0          0          0.000           0
| write:         0        0         0         0          0          0.000           0
| Device does not support Self Test logging

"SMART Health Status: OK"?  That doesn't look right.

Then, the newer disk:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
|
| Device: QUANTUM  ATLAS10K3_18_WLS Version: 020W
| Serial number: 342210449270
| Device type: disk
| Local Time is: Sun Jun 29 19:13:01 2003 EEST
| Device supports SMART and is Enabled
| Temperature Warning Enabled
| SMART Health Status: OK
| Current Drive Temperature:     39 C
| Manufactured in week 14 of year 2002
| Current start stop count:      73 times
| Recommended start stop count:  4294967295 times
|
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:       1426        0         0         0          0          0.227           0
| write:         0        0         0         0          0          0.168           0
|
| Non-medium error count:        2
| No self-tests have been logged
| Long (extended) Self Test duration: 672 seconds [11.2 minutes]

Quote:> Also, please try running self-tests with the smartctl -t
> option, and send or post additional smartctl -a output when
> those tests have completed.

Will do.

 
 
 

Testers needed: is smartmontools is 64-bit clean?

Post by Kalle Olavi Niemital » Tue, 01 Jul 2003 01:43:48




>> Also, please try running self-tests with the smartctl -t
>> option, and send or post additional smartctl -a output when
>> those tests have completed.

> Will do.

After -t short and -t long:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
|
| Device: QUANTUM  ATLAS10K3_18_WLS Version: 020W
| Serial number: 342210449270
| Device type: disk
| Local Time is: Sun Jun 29 19:40:31 2003 EEST
| Device supports SMART and is Enabled
| Temperature Warning Enabled
| SMART Health Status: OK
| Current Drive Temperature:     39 C
| Manufactured in week 14 of year 2002
| Current start stop count:      73 times
| Recommended start stop count:  4294967295 times
|
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:       1493        0         0         0          0          0.227           0
| write:         0        0         0         0          0          0.172           0
|
| Non-medium error count:        2
|
| SMART Self-test log
| Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
|      Description                              number   (hours)
| # 1  Background long   Completed                   -   230                   - [-   -    -]
| # 2  Background short  Completed                   -   230                   - [-   -    -]
|
| Long (extended) Self Test duration: 672 seconds [11.2 minutes]

While the tests were running, smartctl -a displayed a message to
that effect.

 
 
 

Testers needed: is smartmontools is 64-bit clean?

Post by Bruce All » Tue, 01 Jul 2003 13:43:04


Thanks a lot for the posts and patches!

I'll incorporate the ATA-side patches immediately.  The SCSI-side
patches look right, but they'll have to wait until Doug Gilbert (who
handles the SCSI side) takes a look at them.  He can also address the
question about the (surprising!) SMART status of the sleeping device.

Cheers,
    Bruce

 
 
 

1. Smartmontools now big-endian clean: testers needed before new release generated

Smartmontools is a package for monitoring the SMART status of ATA and
SCSI disks. SMART is a feature built into most modern disks that
continuously monitors the health and operational status of the disk.

Recently, in response to an inquiry from a PPC user, I removed the
"little endian x86 bias" from the code.  After these changes, it
worked correctly for that user. But before I generate a new
smartmontools release and advertise that it will work correctly on
big-endian hardware, I was hoping that a few linux PPC users from this
group could download the smartmontools from CVS and test that it works
correctly for them also.

To test the code, please see http://smartmontools.sourceforge.net/ for
instructions on how to download the latest code from CVS.  Please do
NOT use one of the existing releases, such as 5.1-14, as they don't
incorporate the big-endian clean code yet. [Note that both the SCSI
and ATA parts of the code require testing.]

Thanks!

Bruce Allen

2. Solaris 2.4 on a Classic

3. HALstation (64-bit processor running 64-bit Solaris) as webserver

4. Automated restores using bru

5. IBM announces 64-bit mainframes and 64-bit Linux for S/390

6. FAT32 partition recognized by Linux, but not by Win95 and DOS

7. Need to run 32-bit instead of 64-bit on Solaris

8. efax error message

9. [FB PATCH] cfbimgblt isn't 64-bit clean

10. Is 64-bit Linux "true" 64 bit thru-and-thru??

11. 64 bit Unix (esp. 64 bit IO)

12. host mastered 64 bit wide transfers to 64 bit PCI slot?

13. performance of runing 32/64 bit program in 64 bit kernel.