Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 09-08-2008, 02:30 PM   #1
LQ Newbie
Registered: Oct 2004
Distribution: Redhat / Open SuSE
Posts: 4

Rep: Reputation: 0
Exclamation Badblocks in LVM


I have a lvm setup with 4 hard disks in total 2TB size. Reiserfs is the file system used. Well coming to the problem.

One of the hard disk has around 130 badblocks. I ran badblocks against the disk which is /dev/sda and it has given the block entries which are corrupted in a file.

What is the best solution to fix this issue. I have a huge database running on that server which doesnt want to start due to this isssue. After doing little search i found that if the problem is on a single hard drive with ext2 file system

The blocks exist on the sda4 partition on my case

fsck -t ext -l badblocks-logfile /dev/sda4

should fix the issue

if its reiserfs then

reiserfsck -B badblocks-logfile /dev/sda4

should i do the same with lvm and will it work fine ? what am worried is if am going to attempt the above step will it disturb the current lvm setup or is there any other bestway to do it.

I did come across another document which i couldnt follow the first step itself.

Any help would be much appreciated.
Old 09-08-2008, 04:14 PM   #2
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
There may already some data (parts of your database files) be blackholed in bad blocks.
Once a disc does show visible badblocks, all spare blocks may be exhausted and the number of bad blocks will continue to increase, taking data with it.
Or, the harddrive may give up and die the other day.
You really should backup that drive. If your lvm is made of spanned or striped disks, you may have to backup the whole lvm. With some level of experience and knowing about the risk, you may also try to dd-rescue the kaput drive to another one, make sure the superblocks are copied as well, and try to exchange the drive hoping your lvm will accept it. Make sure the partition uuids are the same as on the old drive.


badblocks, lvm

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
badblocks rotty Slackware 2 10-21-2006 07:30 AM
badblocks time linuxhippy Slackware 20 07-16-2005 10:48 PM
Badblocks odd Linux - Software 1 06-03-2004 01:54 PM
badblocks check... wrongman Linux - Hardware 3 05-20-2004 10:38 AM
Badblocks and using dd? sthemage Linux - General 1 12-26-2003 02:52 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration