BadBlocks = lost data. You can check and correct them in a couple of commands.

See which disc we will check:

sudo fdisk -l

Knowing the disk, we launch the badblocks utility:

sudo badblocks -v /dev/sdb1 > badsectors.txt

What do the parameters mean:

We specify the following parameters for verification:

  • -v — detailed conclusion of information on the audit results,
  • /dev/sdb1 — section to be audited,
  • badsectors.txt — in this file we save information about broken sectors, which we will then work with..

Two utilities are usually used for fixing:

  • e2fsck – for file systems ext2, ext3, ext4,
  • fsck – for all others who are not ext*

We are launching:

sudo e2fsck -l badsectors.txt /dev/sdb1

or:

sudo fsck -l badsectors.txt /dev/sdb1

… and basically everything!

P.S. I recommend doing this regularly 🙂

Upd. Using smartmontools:

I saw another utility that shows SMART data (Self-Diagnostic Winchester Data):

sudo apt-get install smartmontools
sudo smartctl -H /dev/sdb1

other parameters:

  • -a or –all – show all data about the disk,
  • -x or –xall – to see other parameters of the drive
No Comments
Comments to: Disk test for broken sectors in Ubuntu

Your email address will not be published. Required fields are marked *

Attach images - Only PNG, JPG, JPEG and GIF are supported.

Good Reads

Worlwide

Trending

Advertiser

Login

Welcome to Typer

Brief and amiable onboarding is the first thing a new user sees in the theme.
Join Typer
Registration is closed.