Koozali.org: home of the SME Server

smart pre-fail, fsck a reboot, dist-upgrade, ripristino ecc

Offline redteo

  • *
  • 122
  • +0/-0
    • redteo blog
smart pre-fail, fsck a reboot, dist-upgrade, ripristino ecc
« on: March 03, 2016, 05:34:50 PM »
Buon pomeriggio a tutti.

alcuni giorni fa il mio bravissimo nipote tra i fumi dell'alcool invece di andarsene a dormire a casa sua ha visto bene di approfittare del letto vuoto dello zio all'estero, non riuscendo ad addormentarsi causa pc accesi, ha sconnesso brutalmente la presa di alimentazione delle ciabatte e spento il gruppo di continutà che bippava.
Dal momento che le disgrazie spesso vengono in coppia come i carabinieri, non solo si è corrotto il filesystem ma si è acciaccato di brutto l'hdd. (non inveite, stavo aspettando di rimettere il gemello nell'lvm, ma vista la mancanza di cervelli nella mia zona lo volevo fare di persona, e ancora non ho trovato il modo di farlo dal brasile).

quindi la situazione è questa.
eseguito l'fsck con opzione y da un mio amico guidato in remoto. il pc parte ma la gran parte dei servizi non parte.

dal log messages

vedo i seguenti output:
Code: [Select]
Mar  2 22:44:32 server kernel: ata1.00: configured for UDMA/133
Mar  2 22:44:32 server kernel: sd 0:0:0:0: Unhandled sense code
Mar  2 22:44:32 server kernel: sd 0:0:0:0: SCSI error: return code = 0x08000002
Mar  2 22:45:26 server kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
Mar  2 22:46:55 server kernel: sda: Current [descriptor]: sense key: Medium Error
Mar  2 22:48:06 server kernel:     Add. Sense: Unrecovered read error - auto reallocate failed
Mar  2 22:52:00 server kernel:
Mar  2 22:57:22 server kernel: Descriptor sense data with sense descriptors (in hex):
Mar  2 22:59:29 server smartd[2450]: Device: /dev/sda [SAT], 3 Currently unreadable (pending) sectors
Mar  2 23:02:09 server kernel:         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
Mar  2 23:02:09 server smartd[2450]: Device: /dev/sda [SAT], 7 Offline uncorrectable sectors
Mar  2 23:02:09 server kernel:         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
Mar  2 23:02:09 server smartd[2450]: Device: /dev/sda [SAT], 7 Offline uncorrectable sectors
Mar  2 23:05:27 server kernel:         20 c8 da 44
Mar  2 23:09:21 server smartd[2450]: Device: /dev/sda [SAT], ATA error count increased from 23828 to 24392
Mar  2 23:11:27 server kernel: ata1: EH complete
Mar  2 23:20:26 server kernel: SCSI device sda: drive cache: write back
Mar  2 23:24:38 server kernel: SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
Mar  2 23:27:19 server kernel: sda: Write Protect is off
Mar  2 23:28:13 server kernel: sda: Mode Sense: 00 3a 00 00
Mar  2 23:30:36 server kernel: SCSI device sda: drive cache: write back
Mar  2 23:29:25 server smartd[2450]: Device: /dev/sda [SAT], 3 Currently unreadable (pending) sectors
Mar  2 23:30:36 server kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
Mar  2 23:31:30 server smartd[2450]: Device: /dev/sda [SAT], 7 Offline uncorrectable sectors
Mar  2 23:32:42 server kernel: ata1.00: BMDMA stat 0x24
Mar  2 23:35:41 server kernel: ata1.00: cmd 25/00:08:3d:da:c8/00:00:20:00:00/e0 tag 0 dma 4096 in
Mar  2 23:36:17 server smartd[2450]: Device: /dev/sda [SAT], ATA error count increased from 24392 to 24932
Mar  2 23:39:35 server kernel:          res 51/40:00:44:da:c8/40:00:20:00:00/e0 Emask 0x9 (media error)
Mar  2 23:42:16 server kernel: ata1.00: status: { DRDY ERR }
Mar  2 23:43:29 server kernel: ata1.00: error: { UNC }
Mar  2 23:46:29 server kernel: ata1.00: configured for UDMA/133
Mar  2 23:46:29 server kernel: ata1: EH complete
Mar  2 23:47:23 server kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
Mar  2 23:49:10 server kernel: ata1.00: BMDMA stat 0x24
Mar  2 23:52:10 server kernel: ata1.00: cmd 25/00:08:3d:da:c8/00:00:20:00:00/e0 tag 0 dma 4096 in
Mar  2 23:56:40 server kernel:          res 51/40:00:44:da:c8/40:00:20:00:00/e0 Emask 0x9 (media error)
Mar  2 23:59:22 server smartd[2450]: Device: /dev/sda [SAT], 3 Currently unreadable (pending) sectors
Mar  2 23:59:40 server kernel: ata1.00: status: { DRDY ERR }
Mar  3 00:02:23 server smartd[2450]: Device: /dev/sda [SAT], 7 Offline uncorrectable sectors
Mar  3 00:04:11 server kernel: ata1.00: error: { UNC }

le informazioni dello smart riportano quanto segue:
Code: [Select]
[root@server ~]# smartctl -a /dev/sda
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-406.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Blue Serial ATA
Device Model:     WDC WD3200AAJS-00VWA0
Serial Number:    WD-WCARW3000342
LU WWN Device Id: 5 0014ee 100a2c85b
Firmware Version: 12.01B02
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Thu Mar  3 17:03:31 2016 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
                                        was suspended by an interrupting command from host.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 113) The previous self-test completed having
                                        the read element of the test failed.
Total time to complete Offline
data collection:                ( 8400) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 100) minutes.
Conveyance self-test routine
recommended polling time:        (   5) minutes.
SCT capabilities:              (0x303f) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VAL                     UE
  1 Raw_Read_Error_Rate     0x000f   200   200   051    Pre-fail  Always       -       313
  3 Spin_Up_Time            0x0003   175   157   021    Pre-fail  Always       -       4233
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1004
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000e   200   200   051    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   035   034   000    Old_age   Always       -       47806
 10 Spin_Retry_Count        0x0012   100   100   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0012   100   100   051    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1001
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       241
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       1004
194 Temperature_Celsius     0x0022   114   092   000    Old_age   Always       -       33
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   200   200   000    Old_age   Always       -       3
198 Offline_Uncorrectable   0x0010   200   200   000    Old_age   Offline      -       7
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   051    Old_age   Offline      -       2

SMART Error Log Version: 1
ATA Error Count: 45962 (device log contains only the most recent five errors)
        CR = Command Register [HEX]
        FR = Features Register [HEX]
        SC = Sector Count Register [HEX]
        SN = Sector Number Register [HEX]
        CL = Cylinder Low Register [HEX]
        CH = Cylinder High Register [HEX]
        DH = Device/Head Register [HEX]
        DC = Device Command Register [HEX]
        ER = Error register [HEX]
        ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 45962 occurred at disk power-on lifetime: 47806 hours (1991 days + 22 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 3d da c8 e0  Error: UNC 8 sectors at LBA = 0x00c8da3d = 13163069

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 3d da c8 20 08   1d+01:12:15.557  READ DMA EXT
  27 00 00 00 00 00 00 08   1d+01:12:15.557  READ NATIVE MAX ADDRESS EXT
  ec 00 00 00 00 00 00 08   1d+01:12:15.554  IDENTIFY DEVICE
  ef 03 46 00 00 00 00 08   1d+01:12:15.551  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 00 08   1d+01:12:15.551  READ NATIVE MAX ADDRESS EXT

Error 45961 occurred at disk power-on lifetime: 47806 hours (1991 days + 22 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 3d da c8 e0  Error: UNC 8 sectors at LBA = 0x00c8da3d = 13163069

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 3d da c8 20 08   1d+01:12:12.522  READ DMA EXT
  27 00 00 00 00 00 00 08   1d+01:12:12.522  READ NATIVE MAX ADDRESS EXT
  ec 00 00 00 00 00 00 08   1d+01:12:12.519  IDENTIFY DEVICE
  ef 03 46 00 00 00 00 08   1d+01:12:12.516  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 00 08   1d+01:12:12.516  READ NATIVE MAX ADDRESS EXT

Error 45960 occurred at disk power-on lifetime: 47806 hours (1991 days + 22 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 3d da c8 e0  Error: UNC 8 sectors at LBA = 0x00c8da3d = 13163069

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 3d da c8 20 08   1d+01:12:09.621  READ DMA EXT
  27 00 00 00 00 00 00 08   1d+01:12:09.621  READ NATIVE MAX ADDRESS EXT
  ec 00 00 00 00 00 00 08   1d+01:12:09.617  IDENTIFY DEVICE
  ef 03 46 00 00 00 00 08   1d+01:12:09.615  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 00 08   1d+01:12:09.615  READ NATIVE MAX ADDRESS EXT

Error 45959 occurred at disk power-on lifetime: 47806 hours (1991 days + 22 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 3d da c8 e0  Error: UNC 8 sectors at LBA = 0x00c8da3d = 13163069

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 3d da c8 20 08   1d+01:12:06.719  READ DMA EXT
  27 00 00 00 00 00 00 08   1d+01:12:06.718  READ NATIVE MAX ADDRESS EXT
  ec 00 00 00 00 00 00 08   1d+01:12:06.715  IDENTIFY DEVICE
  ef 03 46 00 00 00 00 08   1d+01:12:06.713  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 00 08   1d+01:12:06.712  READ NATIVE MAX ADDRESS EXT

Error 45958 occurred at disk power-on lifetime: 47806 hours (1991 days + 22 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 3d da c8 e0  Error: UNC 8 sectors at LBA = 0x00c8da3d = 13163069

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 08 3d da c8 20 08   1d+01:12:03.544  READ DMA EXT
  27 00 00 00 00 00 00 08   1d+01:12:03.543  READ NATIVE MAX ADDRESS EXT
  ec 00 00 00 00 00 00 08   1d+01:12:03.540  IDENTIFY DEVICE
  ef 03 46 00 00 00 00 08   1d+01:12:03.538  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 00 08   1d+01:12:03.538  READ NATIVE MAX ADDRESS EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_erro                     r
# 1  Extended offline    Completed: read failure       10%     47794         550033988
# 2  Extended offline    Interrupted (host reset)      70%     25402         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

quindi dai precedenti messaggi ne deduco che l'hdd è sull'orlo del precipizio e comunque la smebox inservibile al 90%.

la versione installata:
Code: [Select]
[root@server ~]# cat /etc/e-smith-release
SME Server release 8.1

quindi le prima domande sono le seguenti, è consigliabile in forzare in qualche modo un nuovo controllo del filesystem?
posso in qualche modo da remoto eseguire qualche riparazione sulla superficie del disco, visto che le partizioni sono montate?    fsck e badblocks...
è possibile su sme 8.1 per esempio passare il comando nella riga di avvio del kernel come su altre distro?
es:
Code: [Select]
fsck.mode=force fsck.repair=yes
oppure passare l'opzione "y" usando il flag di controllo /forcefsck ??

detto questo,

nella necessità quindi di sostituire i dischi..
posso ancora accedere e copiare manualmente la configurazione su un disco usb, con il dubbio che i files siano corrotti
e comunque ho un set intero di backup fatto con affa di poco precedente all'evento cosmico.

quindi mi domando, funziona il ripristino di affa su una fresh installed smebox 9.1 ?? dal momento che ho letto che le differenze son molte tra le due versioni.

thanks

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: smart pre-fail, fsck a reboot, dist-upgrade, ripristino ecc
« Reply #1 on: March 03, 2016, 06:21:13 PM »
ciao

che versione di Affa?
comunque si, dovrebbe essere compatibile

Offline redteo

  • *
  • 122
  • +0/-0
    • redteo blog
Re: smart pre-fail, fsck a reboot, dist-upgrade, ripristino ecc
« Reply #2 on: March 03, 2016, 07:20:24 PM »
server bakup:

Code: [Select]
[root@server2 ~]# affa --version
Affa version 3.2.2.3-2 on server2
 Samba service is installed.
 NRPE service is NOT installed.
 Freedup program is installed.

server produzione:

Code: [Select]
[root@server /]# affa --version
Affa version 2.0.0-rc5 on server.piuvita.com (192.168.0.250)
[root@server /]#

« Last Edit: March 03, 2016, 10:52:54 PM by redteo »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: smart pre-fail, fsck a reboot, dist-upgrade, ripristino ecc
« Reply #3 on: March 04, 2016, 09:46:37 AM »
Se la macchina backup contiene il backup di quella di produzione,  puoi fare un rise..
Ma consiglio di farlo fisicamente davanti al ferro
Nel frattempo penserei a cosa fare al nipote

Offline redteo

  • *
  • 122
  • +0/-0
    • redteo blog
Re: smart pre-fail, fsck a reboot, dist-upgrade, ripristino ecc
« Reply #4 on: March 04, 2016, 03:30:03 PM »
siamo d'accordo, in particolare sull'ultima affermazione