Gentoo Archives: gentoo-user

From: Sid Spry <sid@××××.us>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Testing a used hard drive to make SURE it is good.
Date: Tue, 23 Jun 2020 16:08:49
Message-Id: fa1f6c0c-29f5-4a23-9f88-91f34658cc68@www.fastmail.com
In Reply to: Re: [gentoo-user] Testing a used hard drive to make SURE it is good. by Dale
1 On Tue, Jun 16, 2020, at 2:17 AM, Dale wrote:
2 > David Haller wrote:
3 >
4 > I mentioned once long ago that I keep a list of frequently used
5 > commands. I do that because, well, my memory at times isn't that great.
6 > Here is some commands I ran up on based on posts here and what google
7 > turned up when searching for things related on those posts. I wanted to
8 > share just in case it may help someone else. ;-) dd commands first.
9 >
10 >
11 > root@fireball / # cat /root/freq-commands | grep dd
12 > dd commands
13 > dd if=/dev/zero of=/dev/sd bs=4k conv=notrunc
14 > dd if=/dev/zero of=/dev/sd bs=4k conv=notrunc oflag=direct #disables cache
15 > dd if=/dev/zero of=/dev/sd bs=1M conv=notrunc
16 > dd if=<(yes $'\01' | tr -d "\n") of=
17 > dd if=<(yes $'\377' | tr -d "\n") of=
18 > dd if=<(yes $'\xFF' | tr -d "\n") of=
19 > root@fireball / #
20 >
21 >
22 > The target device or file needs to be added to the end of course on
23 > the last three. I tend to leave out some of the target to make sure I
24 > don't copy and paste something that ends badly. dd can end badly if
25 > targeting the wrong device.
26 >
27 >
28 > root@fireball / # cat /root/freq-commands | grep smartctl
29 > smartctl -t long /dev/sd
30 > smartctl -t full ##needs research
31 > smartctl -c -t short -d sat /dev/sd ##needs research
32 > smartctl -t conveyance -d sat /dev/sd ##needs research
33 > smartctl -l selftest -d sat /dev/sd ##needs research
34 > smartctl -t <short|long|conveyance|select> /dev/sd ##needs research
35 > smartctl -c /dev/sd ##displays test times in minutes
36 > smartctl -l selftest /dev/sd
37 > root@fireball / #
38 >
39
40 Thanks for these. I do have a general question: has SMART actually shown
41 anyone predictive capability? In my use and in the use of 4-5 people I know
42 it only makes you aware of errors after the drive is failing but still online.
43
44 I suppose there might be some utility if you're using an error correcting FS,
45 but for desktop use that was and still is somewhat abnormal.

Replies

Subject Author
[gentoo-user] Re: Testing a used hard drive to make SURE it is good. Grant Edwards <grant.b.edwards@×××××.com>