 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

18th August 2012, 10:39 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: At home
Posts: 6

|
|
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 10:42 AM.
|

18th August 2012, 07:35 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711

|
|
|
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.
|

19th August 2012, 11:52 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: At home
Posts: 6

|
|
|
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!
|

19th August 2012, 12:45 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
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 ;-)
|

19th August 2012, 05:06 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711

|
|
|
Re: File system repaired?
Quote:
Originally Posted by george_toolan
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.
|

20th August 2012, 01:47 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: At home
Posts: 6

|
|
|
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 01:49 PM.
|

21st August 2012, 09:31 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: At home
Posts: 6

|
|
|
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!
|

21st August 2012, 10:45 AM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302

|
|
|
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
|

21st August 2012, 11:06 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: At home
Posts: 6

|
|
|
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!
|

21st August 2012, 01:45 PM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302

|
|
|
Re: File system repaired?
Quote:
Originally Posted by CedoraFore
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
|

22nd August 2012, 07:07 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: At home
Posts: 6

|
|
|
Re: File system repaired?
All right, thank you very much!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 19:14 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|