LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


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

Rep: Reputation: 0
Exclamation Badblocks in LVM


hi

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. http://smartmontools.sourceforge.net/BadBlockHowTo.txt

Any help would be much appreciated.
 
Old 09-08-2008, 04:14 PM   #2
Woodypecker
Member
 
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.
 
  


Reply

Tags
badblocks, lvm



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:56 AM.

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