40

how to check bad sector on HDD 6TB

koko@Rumah:~$ sudo badblocks -v /dev/sda2
[sudo] password for koko: 
badblocks: Value too large for defined data type invalid end block (5751976960): must be 32-bit value
Ivan
  • 809
  • 6
  • 13
  • 18

2 Answers2

75

for me the trick was to simply increase the blocksize:

badblocks -b 4096 -v /dev/sda
Markus
  • 851
1

I wanted to run badblocks with the actual blocksize of the disk which I found by running sudo -n blockdev --getbsz /dev/disk

My solution was to create a bunch of partitions of size 2TB and badblocks them individually, avoiding the int32 overflow.

Simon
  • 121