Erinevus lehekülje "Smartmontools" redaktsioonide vahel

Allikas: Kuutõrvaja
(Kasutamine)
15. rida: 15. rida:
 
Kõvaketta oleku vaatamiseks tuleb öelda
 
Kõvaketta oleku vaatamiseks tuleb öelda
  
  # '''smartctl -a on /dev/hda'''
+
# smartctl -a /dev/ad12
 +
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-RELEASE amd64] (local build)
 +
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
 +
 
  === START OF INFORMATION SECTION ===
 
  === START OF INFORMATION SECTION ===
  Model Family:    Seagate Barracuda 7200.9 family
+
  Model Family:    HP 1TB SATA disk GB1000EAFJL
  Device Model:    ST3160811AS
+
  Device Model:    GB1000EAFJL
  Serial Number:    5PT0HAHX
+
  Serial Number:    9QJ28SY7
  Firmware Version: 3.AAE
+
  Firmware Version: HPG6
  User Capacity:    160,041,885,696 bytes
+
  User Capacity:    1,000,204,886,016 bytes
 
  Device is:        In smartctl database [for details use: -P show]
 
  Device is:        In smartctl database [for details use: -P show]
 
  ATA Version is:  7
 
  ATA Version is:  7
  ATA Standard is:  Exact ATA specification draft version not indicated
+
  ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 4a
  Local Time is:    Fri Jan 23 14:01:38 2009 EET
+
  Local Time is:    Mon Oct 25 12:57:25 2010 EEST
 
  SMART support is: Available - device has SMART capability.
 
  SMART support is: Available - device has SMART capability.
  SMART support is: Disabled
+
  SMART support is: Enabled
   
+
 
 +
Tähelepanu tasuks pöörata eriti järgnevale tabelile
 +
 
 +
SMART Attributes Data Structure revision number: 10
 +
Vendor Specific SMART Attributes with Thresholds:
 +
ID# ATTRIBUTE_NAME          FLAG    VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
 +
  1 Raw_Read_Error_Rate    0x000f  072  063  044    Pre-fail  Always      -      73543954
 +
  3 Spin_Up_Time            0x0003  099  098  000    Pre-fail  Always      -      0
 +
  4 Start_Stop_Count        0x0032  100  100  020    Old_age  Always      -      96
 +
  5 Reallocated_Sector_Ct  0x0033  100  100  036    Pre-fail  Always      -      0
 +
  7 Seek_Error_Rate        0x000f  076  075  030    Pre-fail  Always      -      26085343809
 +
  9 Power_On_Hours          0x0032  087  087  000    Old_age  Always      -      11581
 +
  10 Spin_Retry_Count        0x0013  100  100  097    Pre-fail  Always      -      0
 +
  12 Power_Cycle_Count      0x0032  100  037  020    Old_age  Always      -      64
 +
184 End-to-End_Error        0x0033  100  100  003    Pre-fail  Always      -      0
 +
187 Reported_Uncorrect      0x0032  097  097  000    Old_age  Always      -      3
 +
188 Command_Timeout        0x0032  096  096  000    Old_age  Always      -      17180131335
 +
189 High_Fly_Writes        0x003a  100  100  000    Old_age  Always      -      0
 +
190 Airflow_Temperature_Cel 0x0022  060  053  045    Old_age  Always      -      40 (Min/Max  18/42)
 +
194 Temperature_Celsius    0x0022  040  047  000    Old_age  Always      -      40 (0 17 0 0)
 +
195 Hardware_ECC_Recovered  0x001a  033  010  000    Old_age  Always      -      73543954
 +
196 Reallocated_Event_Count 0x0033  100  100  036    Pre-fail  Always      -      0
 +
197 Current_Pending_Sector  0x0012  100  100  000    Old_age  Always      -      3
 +
198 Offline_Uncorrectable  0x0010  100  100  000    Old_age  Offline      -      0
 +
  199 UDMA_CRC_Error_Count    0x003e  200  200  000    Old_age  Always      -      0
  
 
Kui Reallocated_Sector_Ct või Offline_Uncorrectable omavad mingit väärtust (st alväärtusest nullist suuremad), tasub seda võtta ohumärgina ning mõelda ketta vahetamisele ja olulise info varundusele.
 
Kui Reallocated_Sector_Ct või Offline_Uncorrectable omavad mingit väärtust (st alväärtusest nullist suuremad), tasub seda võtta ohumärgina ning mõelda ketta vahetamisele ja olulise info varundusele.

Redaktsioon: 25. oktoober 2010, kell 12:59

Sissejuhatus

Kaasaegsed kõvakettad sisaldavad vahendeid nende seisundi jälgimiseks ning testimiseks. Tarkvara Smartmontools abil saab neid vahendeid kasutada. Tundub, et Smartmontools reeglina töötab hästi igasuguste IDA ja SATA ketastega.

Tarkvara paigaldamine

Kõige sobivam oleks Smartmontools paigaldada operatsioonisüsteemi paketihalduse vahendite abil, nt öeldes Debiani puhul

 # apt-get install smartmontools

FreeBSD's asub tarkvara portsude kataloogis /usr/ports/sysutils/smartmontools

Kasutamine

Kõvaketta oleku vaatamiseks tuleb öelda

# smartctl -a /dev/ad12
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-RELEASE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     HP 1TB SATA disk GB1000EAFJL
Device Model:     GB1000EAFJL
Serial Number:    9QJ28SY7
Firmware Version: HPG6
User Capacity:    1,000,204,886,016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 4a
Local Time is:    Mon Oct 25 12:57:25 2010 EEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Tähelepanu tasuks pöörata eriti järgnevale tabelile

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   072   063   044    Pre-fail  Always       -       73543954
  3 Spin_Up_Time            0x0003   099   098   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       96
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   076   075   030    Pre-fail  Always       -       26085343809
  9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       11581
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   037   020    Old_age   Always       -       64
184 End-to-End_Error        0x0033   100   100   003    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   097   097   000    Old_age   Always       -       3
188 Command_Timeout         0x0032   096   096   000    Old_age   Always       -       17180131335
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   060   053   045    Old_age   Always       -       40 (Min/Max  18/42) 
194 Temperature_Celsius     0x0022   040   047   000    Old_age   Always       -       40 (0 17 0 0)
195 Hardware_ECC_Recovered  0x001a   033   010   000    Old_age   Always       -       73543954
196 Reallocated_Event_Count 0x0033   100   100   036    Pre-fail  Always       -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       3
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

Kui Reallocated_Sector_Ct või Offline_Uncorrectable omavad mingit väärtust (st alväärtusest nullist suuremad), tasub seda võtta ohumärgina ning mõelda ketta vahetamisele ja olulise info varundusele.

Kui teatatakse

SMART Disabled. Use option -s with argument 'on' to enable it.

Oleks soovitatav lisada käsule SMARTi lubamine. S.M.A.R.T on Self Monitoring Analysis And Reporting Technology ehk enesejälgimis-, analüüsi- ja teavitamistehnoloogia. SMART-i toetavad kõik uuemad kõvakettad ja see lubab varakult kõvaketta vigade kohta infot saada.

 # smartctl -s on -a /dev/sda

Seda, et kas kõvaketas üldse toetab SMARTI saab kontrollida

# smartctl -i /dev/sda

Smardi eelnevate errorite logi vaatamiseks

# smartctl -l error /dev/sda

Kettatüübi täpsemaks määratlemiseks tuleb anda -d võti ja selle järele ata, scsi, 3ware, hpt, cciss.

Lühikese kettatesti tegemiseks

# smartctl -t short /dev/sda

Täismahus testi tegemiseks tuleb sisestada käsk

# smartctl -t long /dev/ad1
smartctl 5.39 2009-12-09 r2995 [FreeBSD 7.2-STABLE amd64] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 100 minutes for test to complete.
Test will complete after Fri Mar 19 17:54:17 2010

Use smartctl -X to abort test.

Mis käivitab viidatud kõvaketta sisemised teksti (self-test), test võib aega võtta mitmeid tunde. Tulemusi on näha self-test logis '-l selftest' võtme abil, kui test on oma töö lõpetanud.

# smartctl -l selftest /dev/ad1
smartctl 5.40 2010-10-16 r3189 [FreeBSD 8.1-RELEASE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Self-test routine in progress 90%     11581         -

Käsk

# smartctl --smart=on --offlineauto=on --saveauto=on /dev/hda

Lubab SMARTi kettal /dev/hda, lubab automaatse offline testimise iga nelja tunni järel ja SMART atribuutide automaatse salevstamise.

Võimalik on startida ka smartmontool deemonina ,et pidevalt olla kursis ketaste seisukorraga. FreeBSD's asub näiteseadistusfail

/usr/local/etc/smartd.conf.sample mis tuleks

nimetada ümber smartd.conf'iks ja deemoni binaarfail /usr/local/sbin/smartd

Et teenus starditaks juba boodil tuleb anda käsk

echo 'smartd_enable="YES"' >> /etc/rc.conf

Kasulikud lisamaterjalid