LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2004, 10:22 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
mke2fs -c -c -j /dev/hda* ?


I have had problems with my linux system getting corrupted. I am going to reinstall it again. I am using the command below to make my file system
mke2fs -c -c -j /dev/hda*

the -c -c option is supposed to do a thorough job of checking for bad blocks. Using the above command, what will happen if it finds a bad block: will it tell me? will it make the file system around the bad area? I am kind of curious what to expect.
 
Old 03-30-2004, 02:40 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Straight out of the manpage for mke2fs:
Code:
       -c     Check the device for bad blocks before creating the file system.
              If this option is specified twice, then a  slower,  destructive,
              read-write test is used instead of a fast read-only test.
As I interpret it, mke2fs will try to force writing to the bad block. What happens if it doesn't work I don't know - most likely the whole formatting process will fail. But shouldn't you be considering getting a new disk if it is starting to fail?


Håkan
 
Old 03-30-2004, 05:46 AM   #3
Punboy
Member
 
Registered: Mar 2004
Posts: 32

Rep: Reputation: 15
..... run fsck on it first?
 
Old 03-30-2004, 09:57 AM   #4
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I appreciate any input, but what do you read that makes you interpretate that it will write on the bad blocks? The way I read it it just says it will do a thorough job looking for them, but it does not specify what it does with the information. I would assume that it would use the info it finds to write around the badblocks, but I am not sure of that.
 
Old 03-30-2004, 11:04 AM   #5
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
a read write test will only fail on a physical defect of a disk.

Obviously it wont write filesystem data to it if it cant and will mark this block in its filesystem table.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/hda under lilo.conf even thoug my HD is under /dev/hdb Basel Slackware 8 10-27-2005 07:00 PM
dd if=/dev/hda of=dev/hdb taking forever to complete fechin Linux - Hardware 7 06-19-2005 01:04 AM
mke2fs -j /dev/dvd tytus Linux - Hardware 0 02-16-2005 09:17 AM
mv c:\WINDOWS /dev/null; mount /dev/hda treehead LinuxQuestions.org Member Intro 5 10-19-2004 09:53 AM
How can I boot either one of my hard drives /dev/hda or /dev/hdb, I have RH9 and FC2 omogunkristi Linux - General 1 06-21-2004 06:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration