LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   What's the Linux-equivalent of MS scandisk? (https://www.linuxquestions.org/questions/debian-26/whats-the-linux-equivalent-of-ms-scandisk-269288/)

johnMG 12-22-2004 03:43 PM

What's the Linux-equivalent of MS scandisk?
 
On this weird lesser-know OS I've encountered called MS Windows I can scan a drive for errors including doing a low-level sector scan (maybe AKA a "suface scan"). I realize I can use fsck to check the filesystem, but how do I do a low-level disk integrity check under GNU/Linux?

Moloko 12-22-2004 03:50 PM

Did you ever try the badblocks command? It's quit thorough.

gerrit_daniels 12-22-2004 04:11 PM

I would recommend e2fsck because it also marks the bad blocks in the file system. It only works for ext2 and ext3 file systems though.

run the following command:

# e2fsk -ck <device-name>

johnMG 12-22-2004 04:26 PM

Moloko wrote:
> Did you ever try the badblocks command? It's quit thorough.

Thanks Moloko. Nope, never heard of it, but will look into it.

gerrit_daniels wrote:
> I would recommend e2fsck because it also marks the bad blocks
> in the file system.

Ahh, didn't know that. Thanks. Will read the manpage tonight. Interesting. I'm guessing that the record-keeping of bad-block info is internally handled by the file system driver itself.

Wells 12-22-2004 07:27 PM

Quote:

Originally posted by gerrit_daniels
I would recommend e2fsck because it also marks the bad blocks in the file system. It only works for ext2 and ext3 file systems though.

run the following command:

# e2fsk -ck <device-name>

It should be noted that just about every filesystem that works with linux has it's own fsck system. For instance, there is one for the minix filesystem, the cramfs filesystem, and even ones for MSDOS, NFS, and VFAT.

If you are going for other journaling filesystems, then I am sure it will still work. I know that XFS also has this sort of checking software (xfsprogs is the debian package)


All times are GMT -5. The time now is 12:40 PM.