LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-08-2004, 09:33 AM   #1
svar
Member
 
Registered: Jul 2003
Posts: 362

Rep: Reputation: 30
Marking bad blocks with reiser


I ran badblocks on a SCSI disk and found I have some, as I suspected
Because there is massing writing (and deleting) to this disk, I need to mark them so that I do not have freezes and crashes everytime I try to write to a bad block. Now the man pages only mention ext2 fs. Is there
a way I can mark these bad blocks so they are never accessed
with reiser, or should I reformat using ext2?

I know I should be changing the disk, but that is not possible right now
 
Old 09-08-2004, 09:50 AM   #2
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
This page helped me out whit this problem

Note that you do need reiserfsprogs version 3.6.12-pre1 or newer.

(I know, it also says on top of the page, but i skipped over it when I was having this badblocks-problem.. Took me quite some time to figure out why it wasn't working.. stupid.. )
 
Old 09-09-2004, 04:50 AM   #3
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Ok, thanks, sounds like exactly what I need. So I need to first upgrade reiserfs, then
patch -p0 linux-2.4.22-badblocks.diff
then recompile the kernel, right?
Instead I may upgrade to 2.6.8. I assume I will not need patching then
 
Old 09-10-2004, 01:55 PM   #4
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
If you really want to add the badblocks whit the filesystem mounted, than you need the patch.
But you can also unmount the filesystem, and then add the badblocks.(that's how I did it..) In the last case you don't need any kernelpatching.

Don't know whether this is standard in the newest kernel; you could try..
 
Old 09-10-2004, 07:31 PM   #5
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Thanks, I can umount the partition, but what commands do I need to permamently mark the bad blocks as such and avoid them ever being accessed?
 
Old 09-11-2004, 08:35 AM   #6
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
First you should get a list of badblocks on your disk, whit
Code:
/sbin/badblocks [-b <reiserfs-block-size>] device >> badblockfile
This saves all the badblocks on the disk in a file called 'badblockfile'

the default for reiserfs-block-size is 4k. If yours is 4k too (you haven't entered a blocksize when formatting) you should type 4096 here (=4*1024).

Then mark the badblocks as 'bad' of the filesystem whit:
Code:
reiserfsck --badblocks badblockfile device
Here badblocksfile is the output-file of badblocks

You should check the disk whit reiserfsck first to see if there aren't any other problems.

That should do the trick. Now they will atleast be unused until you format the drive again. When you format the disk again, you should do it whit a bad-blocks check.

good luck.
 
Old 09-15-2004, 02:58 AM   #7
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Need to upgrade reiser, sinc emy reiserfsck does not support badblocks(from slack 9.1)
Better yet, I'll upgrade everything.
 
Old 02-08-2005, 08:16 AM   #8
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Cannot get this to work... How do I format the disk?
 
Old 02-08-2005, 09:18 AM   #9
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
You can (re)partition the disk whit fdisk or cfdisk, and then format it as reiserfs whit mkreiserfs .
check the manpages of these commands on how to use them.

But, If you want to upgrade anyways, you can also format the disk during slackware-setup..
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bad blocks bong.mau Linux - General 1 11-16-2005 03:17 PM
marking bad sectors in linux joe56 Linux - Software 1 06-14-2004 10:55 PM
How to do a bad blocks check yelo Linux - General 2 04-02-2004 11:14 PM
RedHat 9 with Bad blocks? chrismc2 Red Hat 3 01-22-2004 08:48 AM
Bad Blocks - RedHat 9 salvatore Linux - Hardware 5 10-22-2003 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:05 PM.

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