LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 11-20-2006, 10:23 AM   #1
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Rep: Reputation: 32
What exactly does fsck do?


I'd like to know if fsck would serve as an alternative to Spinrite or HDD Regenerator.

Will fsck mark bad physical sectors, and write the partition table to ensure they are never allocated?
 
Old 11-20-2006, 11:24 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Well, technically, fsck is just a front-end to the various file system specific checkers. Use the info fsck command from a terminal window for details.

In general, no, fsck invoked checkers will not change the partition information. Depending on the file system is use, a "bad inode" table may be accessed to "black list" physical locations on the disk, but this is not added to the disk partition information.

Note that most IDE or SATA drives produced since the eighth decade of the 20th century have included "self repair" hardware, and un-allocated sectors, which are automatically used to replace any sectors found to be bad when the drive's POST is run. And, I think, periodically thereafter. So, unless you're using a really old drive, I'd suspect that the functionality you're considering is, at best, obsolescent.
 
Old 11-20-2006, 12:34 PM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
As I understand it, those drive analysis/repair tools go deeper than fsck, which IFAIK only looks at the filesystem data, not the lower level drive information. That's not to say spinrite and friends don't know about the filesystem data too.

I think those deeper tools do lots of funky stuff, among it using SMART, which is something to do with asking the drive about lower level stuff. There is a SMART daemon which runs on Linux which I think is used to monitor the health of drives, but I don't know exactly what it is capable of.
 
Old 11-20-2006, 01:08 PM   #4
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Thanks for the feedback

In my particular case, I have an old Seagate ST3491A, which was manufactured in a time before they printed dates of manufacture on the drives . I've noticed data corruption that fsck does not correct (ie. fsck finds errors everytime it runs, even when it runs two passes back to back). This suggests that fsck does no kind of preventative maintenance. I would also speculate that this drive predates SMART features, so software that merely makes use of SMART would probably be inadequite. In cases where a drive doesn't have SMART, Spinrite appears to bridge the gap by implementing it's own version of it; at least, that's what the marketing propaganda leads me to think. So my next question is whether there exists a GNU package that's as extensive as spinrite.
 
Old 11-20-2006, 01:39 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
If you end up buying SpitRite, I'd be interested to find out if it works, or if the [plausible sounding] user feedback which gets read out on Security Now is accurate...
 
Old 11-21-2006, 09:05 PM   #6
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by matthewg42
As I understand it, those drive analysis/repair tools go deeper than fsck, which IFAIK only looks at the filesystem data, not the lower level drive information. That's not to say spinrite and friends don't know about the filesystem data too.
From what I've been reading, you're correct. Although GRC states that Spinrite is purely concerned with low level physical aspects, and knows nothing about filesystems. However I'm not sure how GRC can make that statement, when their software was claimed at one point to only work on FAT16 filesystems.

I'm curious where the bad block blacklist is stored. What if Spinrite marks some areas as bad, and then I wipe out the HDD after that and start over? Is the blacklist lost?

I've also read that ddrescue is the GNU alternative to Spinrite, but I got the impression ddrescue is purely for data recovery, and doesn't attempt to restore the HDD back to use by marking bad areas.
 
Old 11-21-2006, 09:36 PM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Quote:
Originally Posted by jgombos
...(ie. fsck finds errors everytime it runs, even when it runs two passes back to back). This suggests that fsck does no kind of preventative maintenance...
From the first line of the DESCRIPTION section of "man fsck":
Quote:
fsck is used to check and optionally repair...
You did tell it to actually repair things and not just report them, right? Just making sure...
 
Old 11-21-2006, 10:31 PM   #8
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by haertig
You did tell it to actually repair things and not just report them, right? Just making sure...
I don't recall. Hopefully I used the -a switch. I remember that it ran as part of the bootup process, and said something to the effect that it was unable to repair and that I should run fsck manually. When I ran fsck, I recall it complained that the drive was readonly (the boot sequence probably rendered it readonly when problems were found). So I had to remount the drive as read/write so I could run fsck. I assume fsck would not require a writeable filesystem if it wasn't set to repair.
 
Old 11-21-2006, 11:22 PM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
I thought I just posted, but it didnt show up. So it it shows up later and this is a duplicate ... sorry about that!
Quote:
Originally Posted by jgombos
So I had to remount the drive as read/write so I could run fsck.
Normally you run fsck on an unmounted filesystem. It can be dangerous to run it on a mounted one!
 
Old 11-22-2006, 12:12 AM   #10
jgombos
Member
 
Registered: Jul 2003
Posts: 256

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by haertig
Normally you run fsck on an unmounted filesystem. It can be dangerous to run it on a mounted one!
Maybe I misused the tool then. I don't think it would have mattered anyway; since Spinrite found some physically defective areas.

Last edited by jgombos; 11-22-2006 at 12:13 AM.
 
  


Reply

Tags
ddrescue, fsck


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
2 fsck or not 2 fsck? naps Suse/Novell 4 03-18-2005 03:11 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 08:51 AM
How to do fsck Please help Zi5 Linux - Distributions 2 05-13-2004 07:47 PM
again fsck Toasti Linux - Newbie 2 09-29-2003 02:55 AM
Fsck scottpioso Linux - Newbie 7 06-01-2003 04:06 PM


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