summaryrefslogtreecommitdiff
path: root/080_blog/00015_Admin/00030_Fixing-HDD
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2019-03-07 23:26:17 +0100
committerMiguel <m.i@gmx.at>2019-03-07 23:26:17 +0100
commit52f86ea0075c66e18e4796ad88f45541da8b4de5 (patch)
treea7dcdb140e49ca13ed2315970e3b86e0c6fb9ef3 /080_blog/00015_Admin/00030_Fixing-HDD
parenta9e55a351753af1cfdeb75bdf50ecfd80de129c0 (diff)
some cleanup and such
Diffstat (limited to '080_blog/00015_Admin/00030_Fixing-HDD')
-rw-r--r--080_blog/00015_Admin/00030_Fixing-HDD/index.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/080_blog/00015_Admin/00030_Fixing-HDD/index.md b/080_blog/00015_Admin/00030_Fixing-HDD/index.md
new file mode 100644
index 0000000..0bae730
--- /dev/null
+++ b/080_blog/00015_Admin/00030_Fixing-HDD/index.md
@@ -0,0 +1,48 @@
+# Fixing HDD after Free Falling
+
+So you also dropped your hard-disk and some of your secotrs got damaged,
+probably by the head hitting the platter?
+
+Backup all your data.
+
+## smartctl
+
+Try from fastest to slowest to find faulty sector: replace LBAi\_START,LBA\_END with meaningful values.
+
+ smartctl -t [long|conveyence|short|select,LBA_START-LBA_END] -C /dev/sda
+
+## hdparm
+
+Bi-search via –read-sector if complete ranges are affected (as in my case) and then fix them in one step:
+
+ for i in {36312851..36312886}; do hdparm --write-sector $i /dev/sda; done
+
+## Example
+
+Exemplary session fixing one sector:
+
+**WARNING: this will destroy your data !**
+
+ 1) # smartctl -a /dev/sda | egrep 'Pend|Real|Offline_Unc'
+
+ 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 4
+ 197 Current_Pending_Sector 0x0012 098 098 000 Old_age Always - 47
+ 198 Offline_Uncorrectable 0x0010 098 098 000 Old_age Offline - 47
+
+ 2) # smartctl -t short /dev/sda
+
+ 3) # smartctl -l selftest /dev/sda
+
+ [...] 1 Short offline Completed: read failure 90% 10632 152076520
+
+ 4) # hdparm --read-sector 152076520 /dev/sda # verification
+
+ [...] reading sector 152076520: FAILED: Input/output error
+
+ 5) # hdparm --write-sector 152076520 /dev/sda
+
+ 6) # smartctl -a /dev/sda | egrep 'Pend|Real|Offline_Unc'
+
+ 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 4
+ 197 Current_Pending_Sector 0x0012 098 098 000 Old_age Always - 46
+ 198 Offline_Uncorrectable 0x0010 098 098 000 Old_age Offline - 46