Score:0

Is it a problem if I have one bad sector on my HDD?

us flag
Jon

SMART data for HDD screenshot

I have had this error for a while now. Is it safe to use?

ar flag
If you bought this HDD and if it is still under warranty, consider getting it replaced under warranty. I had 2 HDDs with bad sectors replaced. The new ones didn't have any so far.
Jerare avatar
in flag
Hi and welcome to Ask Ubuntu. Please consider that Linux Mint isn't part of Ubuntu https://askubuntu.com/help/on-topic You can use Linux Mint forums https://forums.linuxmint.com/ or on the Unix Stack Exchange https://unix.stackexchange.com instead. To answer your question, the SMART result is OK. Having 1 bad sector doesn't mean your hard drive is dying. Just make sure to regularly check the SMART result.
Jon avatar
us flag
Jon
Thanks, Jerare for your answer and yes in the future I will ask questions on the Linux Mint forums.
guiverc avatar
cn flag
Only Ubuntu and official flavors of Ubuntu (https://ubuntu.com/download/flavours) are on-topic here, refer to https://askubuntu.com/help/on-topic where you'll find other SE sites where you question will be welcome if you don't want to use a Mint forum. (*One advantage of Ubuntu is it's many support options, you opted for Mint so take advantage of it's support options, or SE Unix & Linux*)
Jon avatar
us flag
Jon
@guiverc thanks for your answer and I will next time use Linux Mint forums I am kinda new to those forums and thought I could ask for help here as Linux Mint is based on Ubuntu but this site is for Ubuntu only.
guiverc avatar
cn flag
Ubuntu & *flavors* of Ubuntu are *adjustment* free. When code needs to be altered, it's modified & re-compiled, and packaged with no run-time adjustments (or *hacks*) which are executed in Mint because they use an upstream package they cannot control. Mint is a different system that has the *adjustments* done that Ubuntu people may not be fully aware of, nor the added security implications of them etc... You're best seeking help fully aware of your system & it's design decisions.
Score:5
ru flag

Here is the proper way to bad block your hard disk...

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.
sudodus avatar
jp flag
+1 for a good answer :-)
Jon avatar
us flag
Jon
@heynnema Thanks very much for your comment
heynnema avatar
ru flag
@Jon Didn't my bad blocking procedure work for you?
Jon avatar
us flag
Jon
It did work. Very good answer. But you could also use smartctl or scan the drive. Also it seems like that after a while that the current pending sector has disappeared. So now it's just disk is ok. But still got one write error rate and uncorrectable sector could... Which I think that one sector failed the relocate itself.
heynnema avatar
ru flag
@Jon Just curious then... why did you unaccept my answer?
Jon avatar
us flag
Jon
@heynnema oh I did not realise I did that sorry.
Score:4
jp flag

If there is one single bad sector, you can mark it in the operating system, and live with it.

It is a good idea to check regularly, if there is an increase of bad sectors, or in general to check the S.M.A.R.T. status of the drive.

See the following links,

FSCK reports that filesystem still has errors

Repair the partition table and file system of a pendrive - If an Ubuntu file system, scroll down to 'Repair linux file systems with linux tools'

Jon avatar
us flag
Jon
Thanks for your answer. I see is not an issue at the moment but if it increases then the HDD needs replacing. I do have a backup so if it fails I should still be fine.
sudodus avatar
jp flag
@JonathanSteadman, I think you have a good policy for your HDD. Good luck :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.