LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mke2fs -c -c -j /dev/hda* ? (https://www.linuxquestions.org/questions/linux-software-2/mke2fs-c-c-j-dev-hda%2A-163979/)

shanenin 03-29-2004 09:22 PM

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.

hw-tph 03-30-2004 01:40 AM

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

Punboy 03-30-2004 04:46 AM

..... run fsck on it first?

shanenin 03-30-2004 08:57 AM

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.

AutOPSY 03-30-2004 10:04 AM

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.


All times are GMT -5. The time now is 10:52 AM.