Skip to main content

Questions tagged [badblocks]

Corrupted blocks on a filesystem. Blocks are a unit of division on a filesystem.

Filter by
Sorted by
Tagged with
6 votes
1 answer
1k views

Interpreting the output of badblocks: when is it time to replace the MicroSD card?

Context I am running a Raspberry Pi Zero with a Micro SD as it is designed.  However, for this specific application, I cannot use a read-only system as I usually do with a Raspberry Pi. Objective Keep ...
giovi321's user avatar
  • 917
3 votes
1 answer
593 views

I/O errors, but after running badblocks everything works again : how is that possible?

TLDR; HDD seemed damaged. Unable to format partition (mkfs.ext4 I/O errors), even with a newly created GPT table. SMART test shows some errors. I was about to throw the disk away. Before that, out of ...
ChennyStar's user avatar
  • 1,805
1 vote
1 answer
754 views

SSD: `badblocks` / `e2fsck -c` vs reallocated/remapped sectors

The badblocks utility allows one to find bad blocks on a device, and e2fsck -c allows one to add such bad blocks to the bad block inode so that they will not be used for actual data. But for SSD, it ...
vinc17's user avatar
  • 12.2k
0 votes
0 answers
773 views

How to resolve dd error reading?

I have dd error reading # sudo dd if=/dev/sda1 of=backup.img bs=4M status=progress 16478679040 bytes (16 GB, 15 GiB) copied, 154 s, 107 MB/s dd: error reading '/dev/sda1': Input/output error 3928+1 ...
Dims's user avatar
  • 3,305
1 vote
0 answers
154 views

badblocks stuck in a loop?

I'm using a program called badblocks to scan disks for errors, and I'm finding that it sometimes appear to get stuck in a loop. I'm using in read/write mode and by default it tests four patterns. Here'...
jyoung's user avatar
  • 121
0 votes
1 answer
706 views

New HDD: Number of Mechanical Start Failures: 6

I have bought a new HDD. Toshiba P300 2TB; HDWD120UZSVA Data sheet: https://www.toshiba-storage.com/products/toshiba-internal-hard-drives-p300/ To be sure, that this drive is in good health and will ...
Wogehu's user avatar
  • 123
1 vote
0 answers
164 views

ZFS On Linux - recover lacked MBR after physical problem

We had a physical problem in our backup server (we suppose an electrical shock due to the thunderstorm). The system is Linux Debian on a disk and the storage in on a two 4 TB disks RAID-1 ZFS (ZFS On ...
Le Nain Jaune's user avatar
7 votes
3 answers
4k views

Really Remapping Bad Blocks on disk

I have a SATA drive which has a total of 8 bad blocks identified by the badblocks program. Supposedly the drive firmware should be able to remap them and substitute spares. I've run badblocks in -n ...
kmand's user avatar
  • 121
2 votes
0 answers
1k views

How do I determine what files are affected by bad blocks on a disk that uses LUKS and XFS?

Here is my setup: no partition, just LUKS1 and then XFS inside that. To confirm, the disk was set up like so: disk is installed, luksFormat, luksOpen, mkfs.xfs, mount, start using. First of all, what ...
gfdjjrtiejo's user avatar
2 votes
3 answers
2k views

Manually telling EXT4 about bad sectors?

The drive is currently in NTFS. After running chkdsk for hours, I have found the locations of bad sectors (below). I want to reformat the disk in EXT4. I have heard that EXT4 has some sort of metadata ...
Damn Vegetables's user avatar
1 vote
0 answers
409 views

how to locate the root cause of a corrupted ext3 filesystem

I have a 4G Compact Flash card with a 2.5G ext3 partition. The file system has become corrupted. I am not necessarily interested in fixing the file system as identifying exactly what is corrupted in ...
Jared Sanchez's user avatar
0 votes
1 answer
364 views

Does `badblocks` scan for software or hardware failures?

From the manpage: badblocks - search a device for bad blocks but as I try to isolate between software and hardware, I might need a bit more context. Does badblocks scan for software (filesystem) or ...
tarabyte's user avatar
  • 4,396
4 votes
1 answer
1k views

Speeding up `badblocks` by tweaking its `-c` switch

I have just tried upon tweaking the badblocks utility to use more RAM and possibly achieve a bit higher performance. The exact command I am running is (without HDD's S/N): badblocks -v -b 4096 -c ...
Vlastimil Burián's user avatar
0 votes
1 answer
3k views

What does command do: `badblocks -svn /dev/sda`? does it just report the bad blocks?

This command: badblocks -svn /dev/sda What does it do? Does it just report the bad blocks? Or does it somehow handle the bad blocks so that I don't need to be worried about them? I read the manual by ...
Megidd's user avatar
  • 1,559
1 vote
1 answer
192 views

Query detected badblocks from NTFS

When creating an ntfs partition with mkfs.ntfs, it does zeroing and badblocks scanning by default. But unlike e2fsck -fccky it does not output how many badblocks it actually found. I would like to get ...
xeruf's user avatar
  • 581
2 votes
1 answer
552 views

hard drive read throughput terrible after running badblocks, recoverable?

I have a collection of new drives, a friend recommended I run badblocks on the new drives before using them. I ran badblocks on some of the new drives before imaging them badblocks -v -s -w -b 4096 -...
ThorSummoner's user avatar
  • 4,512
2 votes
1 answer
2k views

What is my hard drive physical sector size? fdisk, smartctl etc.. give different answers

The harddrive is connected with an external enclosure via USB3.0. $ sudo smartctl -a /dev/sdb === START OF INFORMATION SECTION === Model Family: Seagate Barracuda 3.5 Device Model: ...
sgon00's user avatar
  • 437
0 votes
2 answers
736 views

Deleted files reappear after shutdown

I currently have a problem with the disk on which is mounted my partition. From a recovery partition the df command tells me that the memory of the main partition is 100% occupied and indeed there are ...
Andrea 's user avatar
1 vote
1 answer
582 views

badblocks and mkfs.ext4

I've ran badblocks on a disk /dev/sdc and now I want to use the saved file with badblocks as an argument to mkfs.ext4 -l on a partition. Block size used in both commands are the same. But I'm ...
Adriano dos Santos Fernandes's user avatar
2 votes
1 answer
392 views

How to attest that my USB hard disk is really defective or not?

A few years ago, I bought a 500GB Essentiel B external USB hard drive from Boulanger (a multimedia store in France). Since then I have had 2 failures of the order of 1x / 2 years which seem to lose ...
Le Nain Jaune's user avatar
0 votes
1 answer
191 views

Avoid damaged block in ext4

I am running $ uname -a Linux myhostname 4.14.15-041415-generic #201801231530 SMP Tue Jan 23 20:33:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ...
BowPark's user avatar
  • 4,965
0 votes
2 answers
2k views

Ignore bad sector on ext4 file system without formatting?

UDisk shows the assessment on my disk Disk is OK, 19 bad sectors (24° C / 75° F) This number has remained unchanged for one years long, so I guess my disk is not going to fail, but bad sectors cause ...
user450522's user avatar
1 vote
1 answer
601 views

Can I recover a 500GB Seagate Momentus with bad sectors?

I've received a Seagate 2.5" 5400rpm 500gb HDD that was throwing up a Boot configuration error post some windows updates. I've tried the following on it and nothing seems to work: First step: I ...
fluffehStack's user avatar
5 votes
0 answers
3k views

How ZFS deals with bad sectors?

I have a disk with a couple of bad sectors. I've used badblocks to check which sectors were faulty. dd could not write zeroes to them and smartctl -t long /dev/sdx has failed. I know that you can ...
potato's user avatar
  • 443
0 votes
1 answer
223 views

How can we check bad blocks in a certain directory

What utility, and how its uses, to check if there's bad blocks in a specific directory
user avatar
0 votes
1 answer
331 views

isolate and rule out some defect blocks

How to isolate and rule out some defect blocks or sector of HDD to keep it functional as well as if it has no defect ?
user avatar
0 votes
1 answer
129 views

is my thumbdrive dead?

I got a 16GB Sandisk thumbdrive which was "locked" recently while transfering data, and now I can't do anything to the drive, only able to read the remain data. below here are some attempt ...
CuriousNewbie's user avatar
0 votes
1 answer
334 views

If dd zero does not "format" my disk what should i do?

I got a softbricked/hardbricked 1TB WD Passport HDD which happened when transfering a suspected 11GB PS3 game file from my mac.As for repairing, My mac cannot do anything with the HDD, so I'm trying ...
CuriousNewbie's user avatar
0 votes
1 answer
148 views

Recover large file which contains a few bad blocks

I have an SSD with LVM with one LV dedicated to a Win7 VM .vdi file of 80Gb. The underlying fs is ext4. After installing a new SSD and setting up the new LV's in migrating, the copy from the old SSD ...
bu5hman's user avatar
  • 4,791
2 votes
1 answer
3k views

Repairing Bad Blocks on Linux RAID5 Array - Used Drives

TL;DR: Are the second-hand drive that I've purchased, safe to use for a copy of my backup NAS? I bought four Western Digital 3TB Red HDDs second-hand and have put them into a spare microserver that I ...
Electr0's user avatar
  • 21
2 votes
1 answer
8k views

How to interpret these smartctl results? Possible solutions?

Do I need to dump my SATA hard disk, based on the following smartctl results? I was frequently getting filesystem errors during boot time and even fsck failed to repair it last time. Then I used a ...
beta_me me_beta's user avatar
0 votes
0 answers
135 views

can't start gnome due to bad blocks

I just updated my Arch distribution. But now when I try to log in nothing happens and the below output gets written to the logs. I assume that GNOME can't be started becuase some files it needs live ...
jonathan-dev's user avatar
13 votes
1 answer
31k views

How to check entire hard disk for errors and bad sectors

I may be misunderstanding some concepts here, but as far as I know, each disk has a partition table and actual partitions. I'm looking to test a hard drive for bad sectors and errors, but the tools I ...
Gacek's user avatar
  • 257
2 votes
1 answer
3k views

Using dd to detect bad sectors

Before I sell an old HDD I completely read and write the disk to verify that it has no bad sectors. I always did writing like this: dd if=/dev/zero of=/dev/sdb bs=100M status=progress But my ...
zomega's user avatar
  • 972
1 vote
0 answers
105 views

Wipe disk with bad sectors [duplicate]

I'm trying to wipe a bad disk using dd with the following command sudo dd if=/dev/zero of=/dev/sda status=progress, but it exits prematurely and outputs the following: 13160186368 bytes (13 GB, 12 ...
olfek's user avatar
  • 731
-2 votes
1 answer
250 views

I wanted to fix my hard drive bad sectors but it keep saying I/O error inreturn

So, I was messing up the Windows paging value and accidentally set it to 30Gb and made my PC blue screen. Then I can no longer boot into Windows or GNU/Linux (I have dual boot setup). Luckily I still ...
Edqe's user avatar
  • 3
0 votes
1 answer
292 views

RAID1 recovery process skipping bad blocks

I have a RAID1 array with one sligtly damaged disk /dev/sdb. I put a fresh hard disk /dev/sda into this array in order to mirror sdb (then I’m gonna replace sdb with a fresh HDD). # cat /proc/mdstat ...
Sasha MaximAL's user avatar
1 vote
0 answers
321 views

time estimation for badblocks completion

I recently was trying badblocks and tried- the following thing - $ sudo badblocks -v -s /dev/sda8 Checking blocks 0 to 1300928511 Checking for bad blocks (read-only test): ^C7.81% done, 12:38 ...
shirish's user avatar
  • 12.6k
2 votes
1 answer
3k views

dd if=/dev/zero leaves drive contents in-tact? Bad USB stick?

I thought I could nuke all partitions of a drive by using dd if=/dev/zero of=/dev/sdX. In the past this has always worked for me, but in this case it is not working as expected. #check the partitions ...
Stonecraft's user avatar
2 votes
1 answer
2k views

mdadm RAID5 with bad sectors and bad blocks

I have a 4 disk RAID5 setup with mdadm in Ubuntu 16.04. sdb : good sdc : 8 bad sectors according to SMART, 8 pending, 4 reported errors sdd : bad blocks present according to mdadm --examine sde : ...
JDWK's user avatar
  • 41
1 vote
1 answer
15k views

How to fix bad magic number - Superblock on Linux

I'm running a dual boot system with Windows 7 and Puppy Linux Ubuntu based "Bionic" installed on a separate partition of my main drive. Completely separate from that I have a 1TB Western Digital ...
Gary Platon's user avatar
0 votes
1 answer
138 views

badblocks fails to spot corrupting disk controller

I have file corruption problem on a HDD (the SDD in the same computer works fine): for i in {1..10}; do dd if=/dev/zero of=zeroes_$i.dat bs=512 count=4M done md5sum zeroes_* yields the correct ...
jrouquie's user avatar
  • 129
-1 votes
2 answers
536 views

Allow recovery from interrupted `badblocks -n`

man badblocks says: -n Use non-destructive read-write mode. This answer says: The non-destructive read-write test works by overwriting data, then reading to verify, and then writing the ...
Tom Hale's user avatar
  • 31.5k
1 vote
1 answer
614 views

What pattern(s) does non-destructive badblocks -n write?

man badblocks says: -n Use non-destructive read-write mode. By default only a non- destructive read-only test is done. This option must not be combined with the -w option,...
Tom Hale's user avatar
  • 31.5k
-1 votes
1 answer
487 views

how to identify bad block or disk problem

we want to identify bad block or disk problem by the following umount /grid/sdd badblocks -n -vv /dev/sdd Checking for bad blocks in non-destructive read-write mode From block 0 to 20971519 Checking ...
yael's user avatar
  • 13.5k
0 votes
2 answers
883 views

Does gparted make good use of badblocks lists?

Suppose there's a hard drive /dev/sda, and both that: /dev/sda1 is a single ext4 partition taking up the whole disk, and it's mostly empty of data. dumpe2fs -b /dev/sda1 outputs the badblocks ...
agc's user avatar
  • 7,273
1 vote
0 answers
843 views

Coping with bad sectors on RAID disk

I have a RAID 1 of 2 hard drives managed with mdadm. Today, one of them failed. I figured out that this is because of bad sectors in /dev/sdb. According to badblocks, these sectors are affected: 1028, ...
UTF-8's user avatar
  • 3,327
0 votes
1 answer
754 views

badblocks: Resource busy while trying to determine device size

I am trying to run bad blocks on macOS High Sierra 10.13.6. I installed bad blocks using macports. I keep encountering errors when attempting to run it and I am not sure how to even get bad blocks ...
mcbeav's user avatar
  • 79
0 votes
0 answers
682 views

External HDD failure due to bad blocks

My external HDD failed, I searched on the internet and found that it may have been caused by bad blocks. I therefore ran sudo badblocks -vs -b 4096 -c 64 /dev/sdb1 > ~/Downloads/badsectors.txt in ...
Alessio_110's user avatar
1 vote
0 answers
164 views

Generate gddrescue log file from badblocks list?

I have a list of badblocks. How do I generate a gddrescue mapfile/logfile from it? Assuming that the sector size is known. This is the reverse way of Generating dead LBA list from gddrescue mapfile/...
neverMind9's user avatar
  • 1,700