Skip to content

How to test refurbished drives from serverpartdeals.com #4

Open
@AnalogJ

Description

@AnalogJ

https://serverfault.com/questions/739792/how-to-check-s-m-a-r-t-hdd-status-in-coreos

On CoreOS host

~$ toolbox dnf install -y smartmontools
~$ toolbox --bind=/dev:/dev smartctl --all /dev/sda

You may get "Operation not permitted error", then use bind directly:

~$ toolbox --bind=/dev/sda:/dev/sda smartctl --all /dev/sda

https://gist.github.com/mdPlusPlus/30ebddea8d6167b27ef2d07c75e5ebc9

badblocks -b 4096 -c 65535 -p 0 -t 0 -wsv /dev/sdxx > $disk.log 


badblocks -b 4096 -c 65535 -p 0 -t 0 -s -v -w DEVICE [LAST_BLOCK] [FIRST_BLOCK]

	-b block_size
	-p num_passes
	-s Show the progress of the scan
	-t test_pattern
	-v Verbose mode
	-w Use write-mode test
    -c is the number of blocks which are tested at a time. The default is 64. 
Shows output similar to this: Checking blocks 0 to 1953512447
When cancelled with ctrl+c: Interrupted at block 284489984
To continue: badblocks -b 4096 -p 0 -s -t 0 -v -w DEVICE 1953512447 284489983


    SMART Test, check stats
    smartctl -i /dev/sdxx
    smartctl -A /dev/sdxx
    smartctl -t long /dev/sdxx

https://github.com/Spearfoot/disk-burnin-and-testing


 WD 18TB, Badblocks error, value too large?

Linux newbie here, I got a couple new 18TB EasyStores I'd like to stress test with badblocks. I run:

sudo badblocks -b 4096 -wsv /dev/sdb

...and I get an error saying "Value too large for defined data type invalid end block (4394582016) must be 32-bit value." 


You should be able to badblocks the first half of the blocks, then the next half. Something like:

sudo badblocks -wsv -b 4096 /dev/sdb 2197291008 0

and after that completes...

sudo badblocks -wsv -b 4096 /dev/sdb 4394582016 2197291009

Found this solution here: https://superuser.com/questions/692912/is-there-a-way-to-restart-badblocks and tried it myself. Seems to be working. 


 36

Use

Ctrl-Z

to pause the application and return to the command line. Then use

bg

to allow the process to continue in the background. Finally use

disown

So that the process won't be closed when you disconnect your session and close your terminal.

The process will continue to run but there's no way to 'reattach' to the terminal to view the output that I'm aware of if you reconnect to a new session.

https://unix.stackexchange.com/questions/58550/how-to-view-the-output-of-a-running-process-in-another-bash-session

You can see where badblocks is currently positioned in the drive by looking at its fdinfo in proc, i.e:

root@ubuntu:/home/ubuntu# ps ax | grep badblock
 3772 tty1     D+    12:11 badblocks -v /dev/sdb
 5478 tty2     S+     0:00 grep --color=auto badblock

root@ubuntu:/home/ubuntu# ls -l /proc/3772/fd
total 0
lrwx------ 1 root root 64 Mar  3 00:41 0 -> /dev/tty1
lrwx------ 1 root root 64 Mar  3 00:41 1 -> /dev/tty1
lrwx------ 1 root root 64 Mar  3 00:41 2 -> /dev/tty1
lr-x------ 1 root root 64 Mar  3 00:41 3 -> /dev/sdb

root@ubuntu:/home/ubuntu# cat /proc/3772/fdinfo/3
pos:    1707980816384
flags:  0140000
mnt_id: 24

root@ubuntu:/home/ubuntu# lsblk -bd /dev/sdb
NAME   MAJ:MIN RM          SIZE RO TYPE MOUNTPOINT
sdb      8:16   0 2000398934016  0 disk 

So, this badblocks run is about 85% done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions