# oh no! Help!  is my hd about to die. input/output error.

## Säck

 :Embarassed: 

I run a server that is on night and day. And all of a sudden i get a input/output error for my /home . 

/home is on hdc1 and it's reiserfs.

This is noramlly the sign of a dying harddisk, isn't it? 

Well, it could also be another problem: The server is an old pentium mmx, and the mainboard (no idea which brand) doesn't support big harddsiks. but i found a sollution to the problem to support a 40gb harddisk: I boot the operating system on hda  which is regognized by the motherboard (an older 8gb disk), and then the linux kernel suddently detects the harddisk with 40Gb. (hdc). So i just mounted the harddisk as /home.

Could this be a problem??

Since i couldn't accees any more data i just restarted the system. I tried to copy the whole home directory to hda so i had at least my data backed up. but then i realised that the i/o error occured while accessing a file.

So I'll try to rm the file and copy again. 

When I'm able to make a whole copy of the harddisk, I will format the harddisk with ext3, since i heard that reiserfs sometimes is buggy, <-- could that help, or is it definitly a harddisk problem??

----------

## Säck

oh, ****, i just pretty much deleted all my downloaded files!! luckily i didn't delet my work files.

But, what about xfs or jfs????

----------

## Säck

so, i changed it to ext3 and checked the filesystem for bad blocks, and voilà:

```
gentooserver root # e2fsck -c /dev/hdc1

e2fsck 1.34 (25-Jul-2003)

Checking for bad blocks (read-only test): done

Pass 1: Checking inodes, blocks, and sizes

Error reading block 7 (Attempt to read block from filesystem resulted in short read) while doing inode scan.  Ignore error<y>?

```

What can i do, please Help!!

----------

## Säck

so, i changed it to ext3 and checked the filesystem for bad blocks, and voilà:

```
gentooserver root # e2fsck -c /dev/hdc1

e2fsck 1.34 (25-Jul-2003)

Checking for bad blocks (read-only test): done

Pass 1: Checking inodes, blocks, and sizes

Error reading block 7 (Attempt to read block from filesystem resulted in short read) while doing inode scan.  Ignore error<y>?

```

What can i do, please Help!!

----------

## Säck

i answered with no, since i didn't want to ignore the problem and the program stoped with:

```
Error reading block 7 (Attempt to read block from filesystem resulted in short read) while doing inode scan.  Ignore error<y>? no

Error while scanning inodes (0): Can't read next inode

e2fsck: aborted

Segmentation fault

```

since i didn't know what to do i just restarted the check. (i know, not very brilliant idea)

and look:

```
gentooserver root # e2fsck -c /dev/hdc1

e2fsck 1.34 (25-Jul-2003)

e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/hdc1

Could this be a zero-length partition?
```

hmmm?!!?

----------

## Säck

Please!!! Anyone!

----------

## NeddySeagoon

Säck,

A drive as big as 40Gb should do bad sector remapping for itself, without you being aware its happening. Spare sectors (even tracks) are allocated within the drive for this. Thats why you never see a new drive withh bad sectors any more. They have been mapped out.

As the drive approaches end of life, this mechanism fails because all the spare sectors have been allocated.

Has your partition table been corrupted?

Try running fdisk and looking at it. Don't change anything yet.

----------

## ZennouRyuu

Oddly enough I am in this same situation (except I have already tried to recover my partition table.............and failed miserably) now my 60GB HD won't register as more than 33GB  :Sad: 

----------

## Moled

emerge smartmontools

run a test

copy the output in here

eg:

```
/etc/init.d/smartd start

smartctl -t long /dev/hdc

*wait till it finishes*

smartctl -a /dev/hdc
```

----------

## ZennouRyuu

The output was:

```

smartctl version 5.25 Copyright (C) 2002-3 Bruce Allen

Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===

Device Model:     SAMSUNG SV6004H

Serial Number:    0335J1FR504866

Firmware Version: PY100-10

Device is:        In smartctl database [for details use: -P show]

ATA Version is:   6

ATA Standard is:  ATA/ATAPI-6 T13 1410D revision 1

Local Time is:    Sat Jan 17 01:50:27 2004 UTC

==> WARNING: Contact developers at smartmontools-support@lists.sourceforge.net; may need -F samsung[2] enabled.

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:  (0x02) Offline data collection activity was

                                        completed without error.

                                        Auto Offline Data Collection: Disabled.

Self-test execution status:      ( 241) Self-test routine in progress...

                                        10% of test remaining.

Total time to complete Offline

data collection:                 (2640) seconds.

Offline data collection

capabilities:                    (0x1b) SMART execute Offline immediate.

                                        Auto Offline data collection on/off support.

                                        Suspend Offline collection upon new

                                        command.

                                        Offline surface scan supported.

                                        Self-test supported.

                                        No Conveyance Self-test supported.

                                        No 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.

                                        No General Purpose Logging support.

Short self-test routine

recommended polling time:        (   1) minutes.

Extended self-test routine

recommended polling time:        (  16) minutes.

SMART Attributes Data Structure revision number: 9

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE

  1 Raw_Read_Error_Rate     0x000a   100   100   000    Old_age   Always       -       52

  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       1

  5 Reallocated_Sector_Ct   0x0033   253   253   010    Pre-fail  Always       -       0

  7 Seek_Error_Rate         0x000a   253   253   051    Old_age   Always       -       0

  8 Seek_Time_Performance   0x0024   001   001   000    Old_age   Offline      -       65535

  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       1302800

 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1

197 Current_Pending_Sector  0x0032   253   253   010    Old_age   Always       -       0

198 Offline_Uncorrectable   0x0030   253   253   010    Old_age   Offline      -       0

199 UDMA_CRC_Error_Count    0x000a   253   253   000    Old_age   Always       -       0

200 Multi_Zone_Error_Rate   0x000a   253   253   051    Old_age   Always       -       0

201 Soft_Read_Error_Rate    0x000a   100   100   051    Old_age   Always       -       1

SMART Error Log Version: 1

ATA Error Count: 64 (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]

Timestamp = decimal seconds since the previous disk power-on.

Note: timestamp "wraps" after 2^32 msec = 49.710 days.

Error 64 occurred at disk power-on lifetime: 10856 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

  -- -- -- -- -- -- --

  04 88 00 00 4f c2 f0

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Timestamp  Command/Feature_Name

  -- -- -- -- -- -- -- --   ---------  --------------------

  b0 da 00 00 4f c2 f0 00    5724.000  SMART RETURN STATUS

  ec 00 00 00 00 00 f0 00    5724.000  IDENTIFY DEVICE

  ef 03 45 00 1c 00 f0 02    5057.000  SET FEATURES [Set transfer mode]

  c8 00 08 00 00 00 f0 00    5037.000  READ DMA

  ef 02 00 00 00 00 f0 00    5037.000  SET FEATURES [Enable write cache]

Error 63 occurred at disk power-on lifetime: 10834 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

  -- -- -- -- -- -- --

  10 88 08 4f 00 e8 f4

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Timestamp  Command/Feature_Name

  -- -- -- -- -- -- -- --   ---------  --------------------

  20 00 08 4f 00 e8 f4 00    2969.000  READ SECTOR(S)

  10 00 3f 00 00 00 f0 00    2969.000  RECALIBRATE [OBS-4]

  91 00 3f 3f ff 3f ff 00    2969.000  INITIALIZE DEVICE PARAMETERS [OBS-6]

  00 00 08 4f 00 e8 f4 04    2969.000  NOP [Abort queued commands]

  20 00 08 4f 00 e8 f4 00    2969.000  READ SECTOR(S)

Error 62 occurred at disk power-on lifetime: 10834 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

  -- -- -- -- -- -- --

  10 88 08 4f 00 e8 f4

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Timestamp  Command/Feature_Name

  -- -- -- -- -- -- -- --   ---------  --------------------

  20 00 08 4f 00 e8 f4 00    2969.000  READ SECTOR(S)

  20 00 08 4f 00 e8 f4 00    2969.000  READ SECTOR(S)

  10 00 3f 00 00 00 f0 00    2969.000  RECALIBRATE [OBS-4]

  20 00 08 77 00 50 f5 00    2710.000  READ SECTOR(S)

  10 00 3f 00 00 00 f0 00    2710.000  RECALIBRATE [OBS-4]

Error 61 occurred at disk power-on lifetime: 10834 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

  -- -- -- -- -- -- --

  10 88 08 4f 00 e8 f4

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Timestamp  Command/Feature_Name

  -- -- -- -- -- -- -- --   ---------  --------------------

  20 00 08 4f 00 e8 f4 00    2969.000  READ SECTOR(S)

  10 00 3f 00 00 00 f0 00    2969.000  RECALIBRATE [OBS-4]

  20 00 08 4f 00 e8 f4 00    2969.000  READ SECTOR(S)

  20 00 08 77 00 50 f5 00    2710.000  READ SECTOR(S)

  20 00 08 77 00 50 f5 00    2710.000  READ SECTOR(S)

Error 60 occurred at disk power-on lifetime: 10834 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

  -- -- -- -- -- -- --

  10 88 08 4f 00 e8 f4

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Timestamp  Command/Feature_Name

  -- -- -- -- -- -- -- --   ---------  --------------------

  b0 d5 01 01 4f c2 f0 00    6731.000  SMART READ LOG

  b0 d1 01 01 4f c2 f0 00    6731.000  SMART READ ATTRIBUTE THRESHOLDS [OBS-4]

  b0 d0 01 00 4f c2 f0 00    6731.000  SMART READ DATA

  b0 da 00 00 4f c2 10 00    6731.000  SMART RETURN STATUS

  b0 da 00 00 4f c2 f0 00    6731.000  SMART RETURN STATUS

SMART Self-test log structure revision number 1

No self-tests have been logged.  [Use the smartctl -t option to run these.]

```

----------

## Säck

Sorry, I did already a  create a new empty DOS partition table befor I read your post. But when i started fdisk, it was the same output as this.

 *Quote:*   

> 
> 
> gentooserver root # fdisk /dev/hdc
> 
> The number of cylinders for this disk is set to 77545.
> ...

 

I created a new partition, and now it looks like this, and btw it's a fairy "new" drive:

```

Command (m for help): p

Disk /dev/hdc: 40.0 GB, 40020664320 bytes

16 heads, 63 sectors/track, 77545 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot    Start       End    Blocks   Id  System

/dev/hdc1             1     77545  39082648+  83  Linux

Command (m for help):

```

a will run the  smartmontools later, i'll have to emerge it first. and that takes a while.

thanks

----------

## Säck

Oh, btw I forgott

 *Quote:*   

> Code:
> 
> gentooserver root # e2fsck -c /dev/hdc1
> 
> e2fsck 1.34 (25-Jul-2003)
> ...

 

this didn't occur after a restart of the system, only after the filesystem check (e2fsck) , and the check resulted in a whole bunch of faults that it wanted to correct, in the end it said: sorry not all errors could be fixed.

The drive, should it be mounted or unmounted during the test?

----------

## Säck

all those gentooserver root comments are just a problem of cpy and paste.

```

 === START OF INFORMATION SECTION ===

-bash: ===: command not found

gentooserver root # Device Model:     WDC WD400BB-60DGA0

-bash: Device: command not found

gentooserver root # Serial Number:    WD-WMADK1045983

-bash: Serial: command not found

gentooserver root # Firmware Version: 05.03E05

-bash: Firmware: command not found

gentooserver root # Device is:        In smartctl database [for details use: -P show]

Local Time is:    Sun Jan 18 15:04:55 2004 CET

-bash: Device: command not found

gentooserver root # ATA Version is:   5

-bash: ATA: command not found

gentooserver root # ATA Standard is:  Exact ATA specification draft version not indicated

Total time to complete Offline

-bash: ATA: command not found

gentooserver root # Local Time is:    Sun Jan 18 15:04:55 2004 CET

-bash: Local: command not found

gentooserver root # SMART support is: Available - device has SMART capability.

Error logging capability:        (0x01) Error logging supported.

                                        No General Purpose Logging support.

Short self-test routine

recommended polling time:        (   2) minutes.

Extended self-test routine

recommended polling time:        (  28) minutes.

-bash: SMART: command not found

Conveyance self-test routine

recommended polling time:        (   5) minutes.

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_VALUE

gentooserver root # SMART support is: Enabled

  4 Start_Stop_Count        0x0032   097   097   040    Old_age   Always       -       3696

  5 Reallocated_Sector_Ct   0x0033   192   192   140    Pre-fail  Always       -       113

  7 Seek_Error_Rate         0x000b   200   200   051    Pre-fail  Always       -       0

  9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       7251

 10 Spin_Retry_Count        0x0013   100   100   051    Pre-fail  Always       -       0

 11 Calibration_Retry_Count 0x0013   100   100   051    Pre-fail  Always       -       0

-bash: SMART: command not found

gentooserver root #

gentooserver root # === START OF READ SMART DATA SECTION ===

-bash: ===: command not found

 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       817

196 Reallocated_Event_Count 0x0032   143   143   000    Old_age   Always       -       57

197 Current_Pending_Sector  0x0012   169   067   000    Old_age   Always       -       205

gentooserver root # SMART overall-health self-assessment test result: PASSED

-bash: SMART: command not found

198 Offline_Uncorrectable   0x0012   176   013   000    Old_age   Always       -       162

199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       1580

200 Multi_Zone_Error_Rate   0x0009   190   125   051    Pre-fail  Offline      -       162

gentooserver root #

gentooserver root # General SMART Values:

-bash: General: command not found

gentooserver root # Offline data collection status:  (0x82) Offline data collection activity was

-bash: syntax error near unexpected token `('

SMART Error Log Version: 1

gentooserver root #                                         completed without error.

-bash: completed: command not found

gentooserver root #                                         Auto Offline Data Collection: Enabled.

-bash: Auto: command not found

No Errors Logged

gentooserver root # Self-test execution status:      ( 119) The previous self-test completed having

-bash: syntax error near unexpected token `('

gentooserver root #                                         the read element of the test failed.

-bash: the: command not found

SMART Self-test log structure revision number 1

gentooserver root # Total time to complete Offline

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error

-bash: Total: command not found

gentooserver root # data collection:                 (1506) seconds.

-bash: syntax error near unexpected token `('

# 1  Extended offline    Completed: read failure       70%       697         0x000f0bf4

gentooserver root # Offline data collection

-bash: Offline: command not found

gentooserver root # capabilities:                    (0x3b) SMART execute Offline immediate.

-bash: syntax error near unexpected token `0x3b'

gentooserver root #                                         Auto Offline data collection on/off support.

-bash: Auto: command not found

gentooserver root #                                         Suspend Offline collection upon new

-bash: Suspend: command not found

gentooserver root #                                         command.

-bash: command.: command not found

gentooserver root #                                         Offline surface scan supported.

-bash: Offline: command not found

gentooserver root #                                         Self-test supported.-bash: Self-test: command not found

gentooserver root #                                         Conveyance Self-test supported.

-bash: Conveyance: command not found

gentooserver root #                                         No Selective Self-test supported.

-bash: No: command not found

gentooserver root # SMART capabilities:            (0x0003) Saves SMART data before entering

-bash: syntax error near unexpected token `('

gentooserver root #                                         power-saving mode.

-bash: power-saving: command not found

gentooserver root #                                         Supports SMART auto save timer.

-bash: Supports: command not found

gentooserver root # Error logging capability:        (0x01) Error logging supported.

-bash: syntax error near unexpected token `('

gentooserver root #                                         No General Purpose Logging support.

-bash: No: command not found

gentooserver root # Short self-test routine

-bash: Short: command not found

gentooserver root # recommended polling time:        (   2) minutes.

-bash: syntax error near unexpected token `('

gentooserver root # Extended self-test routine

-bash: Extended: command not found

gentooserver root # recommended polling time:        (  28) minutes.

-bash: syntax error near unexpected token `('

gentooserver root # Conveyance self-test routine

-bash: Conveyance: command not found

gentooserver root # recommended polling time:        (   5) minutes.

-bash: syntax error near unexpected token `('

gentooserver root #

gentooserver root # SMART Attributes Data Structure revision number: 16

-bash: SMART: command not found

gentooserver root # Vendor Specific SMART Attributes with Thresholds:

-bash: Vendor: command not found

gentooserver root # ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE

-bash: ID#: command not found

gentooserver root #   1 Raw_Read_Error_Rate     0x000b   200   199   051    Pre-fail  Always       -       4

-bash: 1: command not found

gentooserver root #   3 Spin_Up_Time            0x0007   111   095   021    Pre-fail  Always       -       1808

-bash: 3: command not found

gentooserver root #   4 Start_Stop_Count        0x0032   097   097   040    Old_age   Always       -       3696

-bash: 4: command not found

gentooserver root #   5 Reallocated_Sector_Ct   0x0033   192   192   140    Pre-fail  Always       -       113

-bash: 5: command not found

gentooserver root #   7 Seek_Error_Rate         0x000b   200   200   051    Pre-fail  Always       -       0

-bash: 7: command not found

gentooserver root #   9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       7251

-bash: 9: command not found

gentooserver root #  10 Spin_Retry_Count        0x0013   100   100   051    Pre-fail  Always       -       0

-bash: 10: command not found

gentooserver root #  11 Calibration_Retry_Count 0x0013   100   100   051    Pre-fail  Always       -       0

-bash: 11: command not found

gentooserver root #  12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       817

-bash: 12: command not found

gentooserver root # 196 Reallocated_Event_Count 0x0032   143   143   000    Old_age   Always       -       57

-bash: 196: command not found

gentooserver root # 197 Current_Pending_Sector  0x0012   169   067   000    Old_age   Always       -       205

-bash: 197: command not found

gentooserver root # 198 Offline_Uncorrectable   0x0012   176   013   000    Old_age   Always       -       162

-bash: 198: command not found

gentooserver root # 199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       1580

-bash: 199: command not found

gentooserver root # 200 Multi_Zone_Error_Rate   0x0009   190   125   051    Pre-fail  Offline      -       162

-bash: 200: command not found

gentooserver root #

gentooserver root # SMART Error Log Version: 1

-bash: SMART: command not found

gentooserver root # No Errors Logged

-bash: No: command not found

gentooserver root #

gentooserver root # SMART Self-test log structure revision number 1

-bash: SMART: command not found

gentooserver root # Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error

-bash: syntax error near unexpected token `('

gentooserver root # # 1  Extended offline    Completed: read failure       70%       697         0x000f0bf4

```

----------

