Login to Members Area

Choose the service you want to log in
     
24x7x365 Presence
1-888-289-2246
Live Chat

Hosting Blog

 

How to check for bad sectors on a drive and repair them

A bad sector is a sector on a disk drive or in memory that cannot be used due to permanent damage or an OS inability to access it.

Badblocks is a Linux utility that one can use to find out the bad sectors on a disk drive.

For ex-

badblocks -v /dev/vda2

We will thus see the badblocks on the disk drive. Also we can redirect the output to the file as well:-

badblocks -v /dev/vda2 > bad-sectors


Once we'll know about the bad sectors in the drive, we can try to fix/repair the errors using the file system check utilities of Linux like the e2fsck command below :-

e2fsck -y /dev/vda2

Note: However, it is always recommended to use e2fsck only when you have unmounted the disk drive in the single-user mode, otherwise there will be possibilities of data loss at that time.

Sachin Tuesday 03 September 2013 - 8:05 pm | | Default

One comment

One or more comments are waiting for approval by an editor.

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.