Fedora Linux Support Community & Resources Center
  #1  
Old 18th August 2012, 11:39 AM
CedoraFore Offline
Registered User
 
Join Date: Apr 2012
Location: At home
Posts: 6
linuxfirefox
Question File system repaired?

Hello,

yesterday I made a backup onto my external harddisk (ext3 formatted) via rsync. After some time it returned

Code:
rsync: stat "/media/my_harddisk/some/dir/foo.bar" failed: Input/output error (5)
rsync error: some files could not be transferred (...)
I then unmounted the disk and started fsck to check it. fsck told me, that the file system seems to be corrupt. I restarted fsck in repair mode and it started working. The process looked like this:
Code:
Pass 1: Checking inodes, blocks and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
(...) clean, 227091/9625600 files, 12789815/38497756 blocks
I did not get any "Fix?" questions fom fsck, the tool just did the above stuff and finished without any error or problem message. I had a defective hard disk in the past, with a similar problem where a hundred "Problem with xy ... Fix?" questions appeared, but nothing this time.

After that I remounted my external harddisk, removed the entire directory where the I/O error had occurred in and restarted my rsync backup script.

Everything worked fine. I also did another fsck check after the backup. fsck did not say "file system contains errors" anymore and returned that the disk seems to be clean (as above).

So, the file system seems to be okay again and even if data was corrupted, rsync should have resynced the data from my internal hard disk (besides I removed and resynced the directory where the error occurred in as already mentioned).

My question is, do you think the hard disk (never had problems before with it) and its filesystem is okay again?

Thanks in advance!

Last edited by CedoraFore; 18th August 2012 at 11:42 AM.
Reply With Quote
  #2  
Old 18th August 2012, 08:35 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 32
Posts: 2,771
linuxfirefox
Re: File system repaired?

If you're satisfied that fsck is happy now, I'd next have a look at the disks' SMART info. The "Disks" application gives you a graphical interface for that, or you can use "smartctl -a /dev/..." as root. Also take a look at /var/log/messages where the error occurred.
Reply With Quote
  #3  
Old 19th August 2012, 12:52 PM
CedoraFore Offline
Registered User
 
Join Date: Apr 2012
Location: At home
Posts: 6
linuxfirefox
Re: File system repaired?

Hello, Gareth!

Thanks a lot for the fast answer!

Quote:
If you're satisfied that fsck is happy now
Yes, I am! I just hope no other files were corrupted in any way.

Quote:
or you can use "smartctl -a /dev/..." as root
Thanks for the tip! The SMART status of the harddisk seems to be okay:

Code:
SMART overall-health self-assessment test result: PASSED
Quote:
Also take a look at /var/log/messages where the error occurred.
I also did that ... seems like the USB connection had a problem. Well, I will have to check that, but I'm glad that the SMART status is okay and fsck was able to repair the file system problems.

Thanks a lot!
Reply With Quote
  #4  
Old 19th August 2012, 01:45 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,078
linuxfirefox
Re: File system repaired?

Quote:
SMART overall-health self-assessment test result: PASSED
That doesn't mean anything. You'll have to look at individual values like Reallocated_Sector_Ct

Try to run a long self test on the drive which will try to read all sectors and will take several hours depending on the size and speed of the drive.

Code:
smartctl -t long  /dev/sdX
If this test completes without errors you should be fine for now ;-)
Reply With Quote
  #5  
Old 19th August 2012, 06:06 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 32
Posts: 2,771
linuxfirefox
Re: File system repaired?

Quote:
Originally Posted by george_toolan View Post
That doesn't mean anything. You'll have to look at individual values like Reallocated_Sector_Ct
Yes, that only means that the test passed last time it was run. Unless you ran a test yourself, that was probably when the drive was manufactured.

You can run a test yourself, or just look at the individual information, such as reallocated sector count etc.
Reply With Quote
  #6  
Old 20th August 2012, 02:47 PM
CedoraFore Offline
Registered User
 
Join Date: Apr 2012
Location: At home
Posts: 6
linuxfirefox
Re: File system repaired?

Allright, thank you very much, guys!

I will also perform a long check to get the "true" harddisk status.

Last edited by CedoraFore; 20th August 2012 at 02:49 PM.
Reply With Quote
  #7  
Old 21st August 2012, 10:31 AM
CedoraFore Offline
Registered User
 
Join Date: Apr 2012
Location: At home
Posts: 6
linuxfirefox
Re: File system repaired?

Okay, I'll do it like this:

As long as the harddisk is connected via USB (2.0), I'll first try a quick test (-t short). Then, I will remove the harddisk from its external case and connect it directly into a computer (SATA2), this should speed up the long check process a bit. At the moment, I only have a notebook, so I have to do the long check later.

Quote:
(...) or just look at the individual information, such as reallocated sector count etc.
I've seen that information before, but I can't tell which of them are relevant to see if something is wrong with the drive or which values for them are normal.

Thanks in advance!
Reply With Quote
  #8  
Old 21st August 2012, 11:45 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,997
linuxfirefox
Re: File system repaired?

An I/O error is not a filesystem error. Two very different things. Of course a fsck may be needed after an I/O error is managed by sector reallocation or whatever.

(smartctl -H...)
Quote:
That doesn't mean anything. You'll have to look at individual values like Reallocated_Sector_Ct
Yes it means something. The health inquiry compares the smart parameters against the thresholds and reports if the mfg believes your drive is still within some range of 'health', or else if it has failed or is failing.

Quote:
Yes, that only means that the test passed last time it was run.
No, the health result is not directly related to the test logs. The selftests do impact the smart parameters, but the health is related to the parameter & thresholds values only.

Yes of course look at the sector reallocation info and pending sector errors....

Interpreting smartctl parameters is not obvious. The values usually start at some high value and then decline toward a threshold. Precise meaning varies from vendor to vendor.

Good resource for understanding
http://en.wikipedia.org/wiki/S.M.A.R.T.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #9  
Old 21st August 2012, 12:06 PM
CedoraFore Offline
Registered User
 
Join Date: Apr 2012
Location: At home
Posts: 6
linuxfirefox
Re: File system repaired?

Thanks for the information. I'm a little baffled ...

Quote:
Yes it means something. The health inquiry compares the smart parameters against the thresholds and reports if the mfg believes your drive is still within some range of 'health', or else if it has failed or is failing.
So, if I get you right smartctl -H (...) returns the current health status (and not the test results from the last time it was run) and that the health information results from the SMART values?

Thanks in advance!
Reply With Quote
  #10  
Old 21st August 2012, 02:45 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,997
linuxfirefox
Re: File system repaired?

Quote:
Originally Posted by CedoraFore View Post
Thanks for the information. I'm a little baffled ...



So, if I get you right smartctl -H (...) returns the current health status (and not the test results from the last time it was run) and that the health information results from the SMART values?

Thanks in advance!

Here is from the man page. Note that "TapeAlert" is for SCSI tape drives and has no bearing on anything modern.


Quote:
-H, --health
Check: Ask the device to report its SMART health status or
pending TapeAlert messages. SMART status is based on informa‐
tion that it has gathered from online and offline tests, which
were used to determine/update its SMART vendor-specific
Attribute values.
TapeAlert status is obtained by reading the
TapeAlert log page.

If the device reports failing health status, this means either
that the device has already failed, or that it is predicting
its own failure within the next 24 hours. If this happens, use
the ´-a´ option to get more information, and get your data off
the disk and to someplace safe as soon as you can.

So yes the health test involves a comparison of the current values of SMART parameters, and perhaps particularly the vendor specific ones (see the Wikipedia page) against some criteria of the manufacturer. This limit should generally be reflected in the threshold value.

A self-test, either online or offline can result in the updating of some of these parameters, but health is not just reading of the last self-test status. It's a consideration of the parameters, including those updated dynamically (read errors for example).

Google published a study of 100,000 drives and found that the SMART parameters were not a good predictor of drive failures for a single drive. So DO NOT listen to some of the jokers on this forum about pitching/replacing/returning your drive on the first sign of a block error. They happen and the drive is likely to survive for a long time. If you start getting a flurry of errors then the health test should post an estimated failure date or report impending failure - but maybe only while in it's death-throws.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #11  
Old 22nd August 2012, 08:07 AM
CedoraFore Offline
Registered User
 
Join Date: Apr 2012
Location: At home
Posts: 6
linuxfirefox
Re: File system repaired?

All right, thank you very much!
Reply With Quote
Reply

Tags
error, file, filesystem, fsck, repaired, rsync

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot create regular file, read only file system? I could do it yesterday ... IronFox Using Fedora 25 6th August 2009 09:59 AM
Quick Update :HP/Compaq laptop repaired due to NVIDIA gpu issues: fedorauser111 Wibble 0 11th October 2008 12:55 PM
Can Java-mangled FC4 be repaired? jhampshire Using Fedora 1 20th December 2005 07:43 AM
File system cache becomming way to large and hanging the system...please help morph166955 Using Fedora 2 16th December 2005 10:45 PM


Current GMT-time: 06:15 (Saturday, 29-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Spot Photos - Tertin kartano