Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
recover data from a hdd with a bad buffer (cache)
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
tuxp3
n00b
n00b


Joined: 28 May 2004
Posts: 61

PostPosted: Thu Sep 23, 2004 4:24 pm    Post subject: recover data from a hdd with a bad buffer (cache) Reply with quote

Hello,
my friend seems to have somehow got his 20gb hdd fried, but because the cache/buffer (the 2mb one) is the only thing bad, he seems to be able to see the data, but not copy it off of the drive.
If he tryes to copy data off the drive it will transfer 2mb then it will hang and windows will drop the drive.

however i am running linux and i have a spare 20gb and i want to just a sector by sector copy to the 100% good drive
how can i disable dd (or anyother tool) from using the cache/buffer
i looked at the hdparm man pages but nothing actually set or turned off the buffer..

as long as the buffer isnt involved then it will work
Any ideas welcome

also his drive is NTFS
and i recently compiled my kernel for hdd raw innerface
Back to top
View user's profile Send private message
KingTaco
Developer
Developer


Joined: 22 Aug 2003
Posts: 207
Location: Bay Area, CA

PostPosted: Thu Sep 23, 2004 6:00 pm    Post subject: Reply with quote

take a look at hdparm. I think you can turn off the on disk cache with that.
_________________
Explaining the obvious to the oblivious.
Adopt an unanswered post today -- https://forums.gentoo.org/search.php?search_id=unanswered
Back to top
View user's profile Send private message
tuxp3
n00b
n00b


Joined: 28 May 2004
Posts: 61

PostPosted: Thu Sep 23, 2004 8:06 pm    Post subject: hdparm -switchs Reply with quote

These are the only revent hdparm switchs i could find...
Quote:

-A Disable/enable the IDE drive's read-lookahead fea-
ture (usually ON by default).
...
-P Set the maximum sector count for the drive's inter-
nal prefetch mechanism. Not all drives support
this feature.
....
-W
Disable/enable the IDE drive's write-caching feature (default state is undeterminable; manufacturer/model specific).
... OR ...
-r
Get/set read-only flag for device. When set, write operations are not permitted on the device

if i set -A disabled and set -P to a very low value 0 or 1 would this minimize the chance of the hdd using the cache when using 'dd' to do a sector by sector copy to the working hdd? also, will this slow things down alot or just a little bit? what are the chances i could get 100% of the data from the drive using this method? what other methods are there ?

Thanks Tux
Back to top
View user's profile Send private message
tuxp3
n00b
n00b


Joined: 28 May 2004
Posts: 61

PostPosted: Fri Sep 24, 2004 10:45 pm    Post subject: Reply with quote

in case anybody cares.. it worked perfectly i made the drive read-only and disabled the read ahead and used dd if=/dev/hdd of=/dev/hdc -bs 2048 it took 1.5 hours but its worth it :)

Thanks tux
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