Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hd dying / how to save data from crypted partition?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AndiZed
n00b
n00b


Joined: 28 May 2005
Posts: 23
Location: Franconia / Germany

PostPosted: Mon Aug 08, 2005 8:42 pm    Post subject: hd dying / how to save data from crypted partition? Reply with quote

hi, i got a serious problem with my hd, which contains a crypted (AES256) partition.
i usually mount it via loop device using the command:

Code:
mount -t reiserfs -o loop=/dev/loop0,encryption=aes-256 /dev/hdc1 /mnt/crypt


a few hours ago i copied a bigger amount of data onto this disc and realized, the system was getting slower and slower. hdparm -T /dev/hdc resulted in a speed at about 280KB/s. i realized there must be something wrong, so i shut the computer down and restarted it (i was thinking of a software problem at this point).

now after the reboot i can not mount the disc anymore; i get the following output:

Code:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)


(this is the same output i get when entering a wrong password, the only difference is the much longer delay between entering the password and receiving the error message when the password is valid)

is there a way to mount the hard disc (which is obviously about to die) at least partially to save some data?


heres the output of smartctl -a /dev/hdc (looks bad, doesnt it?)

Code:
smartctl version 5.33 [i686-pc-linux-gnu] Copyright (C) 2002-4 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     Maxtor 6Y120L0
Serial Number:    Y40L2W6E
Firmware Version: YAR41VW0
User Capacity:    122,942,324,736 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 0
Local Time is:    Mon Aug  8 22:16:52 2005 CEST
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:  (0x82)   Offline data collection activity
               was completed without error.
               Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 116)   The previous self-test completed having
               the read element of the test failed.
Total time to complete Offline
data collection:        ( 242) seconds.
Offline data collection
capabilities:           (0x5b) 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.
               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:     (   2) minutes.
Extended self-test routine
recommended polling time:     (  63) 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
  3 Spin_Up_Time            0x0027   201   190   063    Pre-fail  Always       -       11299
  4 Start_Stop_Count        0x0032   253   253   000    Old_age   Always       -       853
  5 Reallocated_Sector_Ct   0x0033   237   237   063    Pre-fail  Always       -       162
  6 Read_Channel_Margin     0x0001   253   253   100    Pre-fail  Offline      -       0
  7 Seek_Error_Rate         0x000a   253   252   000    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0027   251   247   187    Pre-fail  Always       -       56961
  9 Power_On_Minutes        0x0032   226   226   000    Old_age   Always       -       740h+46m
 10 Spin_Retry_Count        0x002b   253   252   157    Pre-fail  Always       -       0
 11 Calibration_Retry_Count 0x002b   253   252   223    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   252   252   000    Old_age   Always       -       703
192 Power-Off_Retract_Count 0x0032   253   253   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   253   253   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0032   253   253   000    Old_age   Always       -       40
195 Hardware_ECC_Recovered  0x000a   253   252   000    Old_age   Always       -       2261
196 Reallocated_Event_Count 0x0008   240   240   000    Old_age   Offline      -       13
197 Current_Pending_Sector  0x0008   238   238   000    Old_age   Offline      -       159
198 Offline_Uncorrectable   0x0008   181   181   000    Old_age   Offline      -       72
199 UDMA_CRC_Error_Count    0x0008   195   185   000    Old_age   Offline      -       15
200 Multi_Zone_Error_Rate   0x000a   253   252   000    Old_age   Always       -       0
201 Soft_Read_Error_Rate    0x000a   253   249   000    Old_age   Always       -       45
202 TA_Increase_Count       0x000a   253   252   000    Old_age   Always       -       0
203 Run_Out_Cancel          0x000b   253   252   180    Pre-fail  Always       -       312
204 Shock_Count_Write_Opern 0x000a   253   252   000    Old_age   Always       -       0
205 Shock_Rate_Write_Opern  0x000a   253   252   000    Old_age   Always       -       0
207 Spin_High_Current       0x002a   253   252   000    Old_age   Always       -       0
208 Spin_Buzz               0x002a   253   252   000    Old_age   Always       -       0
209 Offline_Seek_Performnce 0x0024   198   195   000    Old_age   Offline      -       0
 99 Unknown_Attribute       0x0004   253   253   000    Old_age   Offline      -       0
100 Unknown_Attribute       0x0004   253   253   000    Old_age   Offline      -       0
101 Unknown_Attribute       0x0004   253   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
ATA Error Count: 3190 (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 3190 occurred at disk power-on lifetime: 8886 hours (370 days + 6 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 01 06 01 00 e0  Error: UNC 1 sectors at LBA = 0x00000106 = 262

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 01 06 01 00 e0 08      03:13:13.664  READ DMA
  c8 00 02 05 01 00 e0 08      03:13:12.640  READ DMA
  c8 00 03 04 01 00 e0 08      03:13:11.616  READ DMA
  c8 00 04 03 01 00 e0 08      03:13:10.608  READ DMA
  c8 00 05 02 01 00 e0 08      03:13:09.584  READ DMA

Error 3189 occurred at disk power-on lifetime: 8886 hours (370 days + 6 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 02 05 01 00 e0  Error: UNC 2 sectors at LBA = 0x00000105 = 261

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 02 05 01 00 e0 08      03:13:12.640  READ DMA
  c8 00 03 04 01 00 e0 08      03:13:11.616  READ DMA
  c8 00 04 03 01 00 e0 08      03:13:10.608  READ DMA
  c8 00 05 02 01 00 e0 08      03:13:09.584  READ DMA
  c8 00 06 01 01 00 e0 08      03:13:08.560  READ DMA

Error 3188 occurred at disk power-on lifetime: 8886 hours (370 days + 6 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 03 04 01 00 e0  Error: UNC 3 sectors at LBA = 0x00000104 = 260

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 03 04 01 00 e0 08      03:13:11.616  READ DMA
  c8 00 04 03 01 00 e0 08      03:13:10.608  READ DMA
  c8 00 05 02 01 00 e0 08      03:13:09.584  READ DMA
  c8 00 06 01 01 00 e0 08      03:13:08.560  READ DMA
  c8 00 07 00 01 00 e0 08      03:13:07.552  READ DMA

Error 3187 occurred at disk power-on lifetime: 8886 hours (370 days + 6 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 04 03 01 00 e0  Error: UNC 4 sectors at LBA = 0x00000103 = 259

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 04 03 01 00 e0 08      03:13:10.608  READ DMA
  c8 00 05 02 01 00 e0 08      03:13:09.584  READ DMA
  c8 00 06 01 01 00 e0 08      03:13:08.560  READ DMA
  c8 00 07 00 01 00 e0 08      03:13:07.552  READ DMA
  c8 00 08 ff 00 00 e0 08      03:13:06.528  READ DMA

Error 3186 occurred at disk power-on lifetime: 8886 hours (370 days + 6 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 05 02 01 00 e0  Error: UNC 5 sectors at LBA = 0x00000102 = 258

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  c8 00 05 02 01 00 e0 08      03:13:09.584  READ DMA
  c8 00 06 01 01 00 e0 08      03:13:08.560  READ DMA
  c8 00 07 00 01 00 e0 08      03:13:07.552  READ DMA
  c8 00 08 ff 00 00 e0 08      03:13:06.528  READ DMA
  c8 00 09 fe 00 00 e0 08      03:13:05.504  READ DMA

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed: read failure       40%      8884         207
# 2  Extended offline    Aborted by host               70%      8884         -
# 3  Short offline       Completed: read failure       60%      8884         207
# 4  Short offline       Completed: read failure       60%      8884         207
# 5  Short offline       Completed: read failure       60%      8884         207

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.



btw, another weird thing:
according to the smartmontools the harddisc had a total running time of 370 days.. when i bought this hd, maxtor limited the warranty time to 1 year... looks like they really knew what they were doing.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Mon Aug 08, 2005 9:28 pm    Post subject: Reply with quote

Code:
emerge dd-rescue
dd_rescue -l /path/to/a/logfile /dev/hdc1 ?????


?????? should preferably be a partition of same size or slightly bigger. It can also be a file on a larger mounted partition... though I'm not sure if you'll be able to mount that with crypt (since it requires an -o loop in and of itself)

Offhand I can tell you that the KNOPPIX 4.0 DVD has dd_rescue; the CDROMs should as well....
Back to top
View user's profile Send private message
AndiZed
n00b
n00b


Joined: 28 May 2005
Posts: 23
Location: Franconia / Germany

PostPosted: Mon Aug 08, 2005 10:35 pm    Post subject: Reply with quote

thx! i'll give that tool a try, after i organized another 120gb disc.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Mon Aug 08, 2005 10:46 pm    Post subject: Reply with quote

AndiZed wrote:
thx! i'll give that tool a try, after i organized another 120gb disc.

Good luck!

www.hddrecovery.com.au/downloads/200ways.pdf
Back to top
View user's profile Send private message
Djento
n00b
n00b


Joined: 03 May 2005
Posts: 66
Location: Bruxelles

PostPosted: Mon Aug 08, 2005 11:35 pm    Post subject: Reply with quote

it's a bad idea to crypt a partition, a simple bad sector and your partition is unrecoverable.

there's another way to use this kind of feature. cryptic fs... but i can't remember and i think it was OpenBSD only :)


best!
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Mon Aug 08, 2005 11:52 pm    Post subject: Reply with quote

Djento wrote:
it's a bad idea to crypt a partition, a simple bad sector and your partition is unrecoverable.

Ouch. Why is that? You'd think that a bad sector tolerant method would be possible....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum