Questions tagged [bad-blocks]

A bad block (or sector) is essentially a block that returns an error rather than the data up on reading it.

Soft errors

Sometimes the issue is merely a mismatch between the data in the block and the ECC value and once we rewrite the block it's okay again and can be used to store new data. This is some times called a soft error.

Hard errors

More serious issues can also occur, in which case the block can not be used any longer. In such a case the hard drive can hide the defect using a method called reallocation.

Reallocation

Say we discover LBA block 100 is bad. Reallocation then means the drive un-maps LBA 100 from the bad block and reassigns LBA 100 to a spare block.

This mutation is recorded in the system area of the hard drive in a module that referred to as the grown defects list or G-List.

The G-List is related to the P-List, which is storing bad sectors that were discovered during manufacturing.

Due to different methods bad sectors in the P-List do not affect the drive speed, G-List entries do (ever so slightly, but still).

115 questions
141
votes
16 answers

How can I intentionally break/corrupt a sector on an SD card?

I need to test the resilience of some read/write code for some embedded hardware. How might I sacrifice a few SD cards and break several known sectors for a controlled study? The only thing I can think of is to overwrite a single sector a few…
Gabe Krause
  • 1,327
43
votes
8 answers

How long does badblocks take on a 1TB drive?

I'm running badblocks (or rather "e2fsck -c") on a 1TB drive and if the progress indicator is any indication (no pun intended), it's going to take almost forever to complete. Right now it says 0.01% done, 30:20 elapsed which would mean the thing…
Steven Don
  • 1,299
  • 1
  • 12
  • 15
24
votes
2 answers

How to make smartd shut up about one particular offline uncorrectable sector?

I have a disk in a two-disk software RAID-1 for which recently an "offline uncorrectable sector" appeared in the SMART status. 198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 1 This apparently is only a sign…
Christian
  • 370
  • 1
  • 3
  • 13
24
votes
6 answers

Using “badblocks” on modern disks

I want to use badblocks to check my HDDs and would appreciate clarification of its operation. Can someone please explain the best options to use with -b and -c? I have included their definitions from the man page, but am not sure if larger sizes…
Yoren
  • 241
24
votes
1 answer

How to test SSDs or NVMe for badblocks'?

With the traditional spinning disks diagnostics is rather easy. If you suspect a drive to be faulty, you can check the SMART values, run a SMART extended test and a badblocks -wsv test. If all three tests show no error, the drive is probably/usually…
masgo
  • 2,324
21
votes
6 answers

How can I test the full capacity of an SD card in Linux?

I purchased a 64 GB SD card from eBay. It works fine when I burn an Arch Linux ARM image to it and use it to boot up my Raspberry Pi. However, when I try to create a single ext4 partition on it to use all capacity of the card, errors occur.…
19
votes
2 answers

Trying to remove/diagnose single Current_Pending_Sector in S.M.A.R.T. data

I'm in a process of doing a fresh Linux install and before I went to do that I thought that it is a good time to verify HDD health since I can safely overwrite any data on the HDD if needed. First I tried checking with smartmontools... My Seagate…
18
votes
3 answers

badblocks vs. SMART Extended Self Test

How does a full read/write surface scan by 'badblocks' differ from the built in SMART Extended self test? It seems like they are both full surface scans, so why does it take badblocks -vws 3 days to test a 1TB drive, while SMART does it in 2 1/2…
15
votes
1 answer

View bad blocks on mounted ext2/ext3/ext4 filesystem

I've ran fsck -c on the (unmounted) partition in question a while ago. The process was unattended and results were not stored anywhere (except the bad block inode). Now I'd like to get bad block information to know if there are any problems with the…
Basilevs
  • 2,904
13
votes
4 answers

Do I have a bad SSD? Bad block count at 257

I have Adata su650 480GB SSD which is generally working fine. Recent check of SMART values using CrystalDiskInfo reports 257 bad block count. Now I need to know a few things with respect to this parameter What is this bad block count and is it…
mmp
  • 207
12
votes
3 answers

Rufus says my USB drive has bad blocks, how do I fix it?

My USB drive have 256 bad blocks according to Rufus, and yes it does contain bad blocks since it always give corrupted error message when I try it to install Windows, but running chkdsk on this USB drive shows no error at all, and even though Rufus…
Nur
  • 1,280
12
votes
2 answers

Rescuing a hdd with bad sectors: dd vs gddrescue

Somewhere on the internets I read that gddrescue is superior to dd at least in terms of being able to distinguish between the amount of disk reads performed on a troubled sector. Is this really the case? time dd if=/dev/sda skip=900343967 of=a.bin…
XXL
  • 1,489
10
votes
2 answers

If I have "badblocks" write its output to a file, and that file is empty, does that mean that no bad blocks were found?

I recently ran badblocks on a large server hard drive to check for possible issues (SMART reported that everything was fine, but I needed to be sure). The command I used was: badblocks -c 1024 -b 4096 -w -s -o /path/to/myfile.txt /dev/mydrive I used…
Zac B
  • 2,903
  • 4
  • 27
  • 39
9
votes
1 answer

Why was my microSD card fixed after formatting?

I'm sure that they were not file system errors: reading it at the block level (pv /dev/sdb > /dev/null) gave a really low 1.4 MB/s and then at some point it stopped with "input/output" error, both from Linux (I/O error) and from Windows + Cygwin…
golimar
  • 1,904
8
votes
2 answers

Is a bad block on a virtual machine a virtual or physical issue?

I am dealing with a virtual machine that is receiving the following entry in the event log: TIME OF EVENT: 7/30/2011 3:47:05 PM EVENT LOG: System EVENT SOURCE: disk EVENT ID: 7 SEVERITY: Error DESCRIPTION: The device, \Device\Harddisk3\DR3, has a…
1
2 3 4 5 6 7 8