LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2008, 03:15 AM   #1
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198
Blog Entries: 1

Rep: Reputation: 32
Rotted file-system, How can I fix it please?


Hi, List, Here I have a funny questions for you, please show me you advises as they are eagerly needed. Any input would be highly appreciated.

Here "/data" is a partition with ext3 built on it. There are about hundreds of thousands of files stored in this directory, but now it's rotted as it has been keeping working for about two years.

My question is how can I fix it *without* a fsck?

$ find /data/* -not -type f -not -type d -exec ls -l {} \;
?----w-r-t 32356 1261460898 1094724373 803671348 Aug 25 1979 /data/140/214/436F3E9530D2AC
?--S-w--wx 10349 154500491 1886015002 681972462 Aug 8 1970 /data/140/214/436F3E95721CAC
?--S---r-t 21249 1126511019 946680862 216939197 Sep 15 2028 /data/140/214/436F3E95E8CDAC
?r-------x 8225 2013930211 24870012 1025978057 Jan 15 1992 /data/140/214/436F3E95F423AC
p---r-xrwt 7499 2104519117 103094612 771750076 Apr 1 2029 /data/140/214/436F3E963F62AC
?rwx-----x 22821 742137538 454371665 1460424462 Oct 17 2012 /data/140/094/436F3E923F9BAC
pr---w-r-x 24850 1478775138 2103456099 979908088 Jun 24 2006 /data/140/094/436F3E9313D4AC
?r-S--x-w- 18534 1450127637 1042825511 1348400150 Jul 17 2013 /data/140/094/436F3E934F37AC
?r-S-wSr-t 8300 1935963689 1114312758 1996846359 Sep 1 1973 /data/140/094/436F3E93575BAC
cr-S--s--t 26461 612195883 2132084819 8, 134 Feb 3 2032 /data/140/094/436F3E936976AC
cr-s-wS-wT 17690 1635075154 1665161254 96, 161 Dec 17 2006 /data/140/094/tbms1m_436F3E936D99AC
?r-x-wx-wx 32541 360529220 1883181909 944007203 Mar 13 2018 /data/140/094/436F3E939CE6AC
s-wx-wx-w- 13176 2021628574 1951407190 1472516488 Jun 13 1976 /data/140/094/436F3E9525B9AC
?rw-rw---- 17744 929646078 629099901 2017553194 Apr 4 1999 /data/140/094/436F3E944C99AC
pr--r-xrw- 22583 1296266925 1534021164 955590349 Apr 27 1972 /data/140/094/436F3E965C39AC
?r-s-wsrw- 21610 576542028 17506141 52896571 Nov 10 2013 /data/142/078
?r---wx--t 9567 587475204 1729435987 620953878 Sep 22 1989 /data/142/004
srws-wSrw- 51358 2329866968 2415706250 2180678031 Jan 24 1929 /data/142/119
find: /data/152/190: Input/output error
b--x-w--wT 18294 1249204858 964120697 74, 114 Apr 23 2006 /data/152/036
?--xrwx--- 26743 1248021442 1396070980 1292586445 Mar 23 2033 /data/152/243
?--x-w--wt 29284 2019971910 1430610738 2018654020 Jul 18 2000 /data/152/140
find: /data/152/222: Permission denied
cr-S-wx--t 10010 1480209935 238633828 74, 38 Dec 31 2010 /data/197/242
br-xrwxrwx 19976 509942770 40705366 113, 9 Feb 15 1989 /data/203/128
?rw---xrwt 14460 1308966237 256313401 1206923799 Feb 1 1990 /data/209/018
?r-srw--w- 25704 1112827985 1937076854 1212249161 Oct 5 2012 /data/212/094
?--xr-xr-x 20530 1397047631 1650865235 792029522 Aug 25 2004 /data/212/235
b--SrwS--x 13379 1714574649 1262835542 114, 141 Jun 10 2034 /data/212/048
s-ws--x--- 48111 4275215518 3924986030 2361512929 Jan 31 1906 /data/217/191
?rwsr-Srw- 2051 392760120 1700344087 1455559504 May 19 1998 /data/219/092
s-wsrws--T 39312 680129739 3483332747 2713450375 Feb 11 1913 /data/219/112
?-wsrwx--- 36775 3653277703 2512753565 2433852829 Dec 15 1961 /data/219/159
?rw--wx-w- 44196 3381366297 2329126531 3815479196 Apr 30 1925 /data/219/077

Maybe some of these files are recoverable after a 'fsck', but how about the ratio please?
 
Old 08-18-2008, 04:16 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
First thing to do is unmount the disk, and perform disk diagnostics. Obtain diagnostic software from your disk vendor's site, and perform a full diagnostic on the disk.

If the disk passes diagnostics, you need to run fsck on the disk. I'm not sure why you are asking how to fix it without fsck. That *is* the tool to verify an ext[23] file system, and possibly fix corruption. If fsck cannot fix all the problems, it may place some files in the lost+found directory at the root of that file system. You will have to manually identify those. If it cannot fix the file system to a working state, it is time to restore from backups.

If the disk does not pass disk diagnostics, it is time to evaluate additional methods from extracting data, and replace the disk, and then restore data from backups.
 
Old 08-18-2008, 05:08 AM   #3
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198

Original Poster
Blog Entries: 1

Rep: Reputation: 32
Hi, Mr. C.;
There are more 5TB need to be backuped if we are going to run fsck, and our poor server may die at any time during this procedure, because of heavy I/O.

I'm just starting to try another ways, like evaluate all the bad files and 'good' files. I need to do some statistics to make sure two things:

1, whether it's safe for me to ignore such little amount of rotted files. It's a file size based evaluation, we never mind lose some megabytes data.

2, Is all the other 'good' ones are really good? As they always can be listed smoothly, Im still not sure whether they can be rightly recognized by our applications. Some of them may be damaged as well.

anyway, to fsck the partition is the final way, and it will also help us to get back some recoverable files.

>> You will have to manually identify those.
I'm very interesting at this topic, but have no luck with google to find out any examples for recovering files that named their inode no. Can you show me some doc and examples

Thanks and Regards,
edencc
 
Old 08-18-2008, 12:55 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Forget trying to avoid fsck. Place the disk on a reliable system. It is not safe to continue operations with a system that has file system errors. Your notion of good vs. bad files is incomplete, and will lead to numerous types of file system problems. fsck runs numerous checks, and there may be multiple layers of errors.
 
  


Reply


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
bad /etc/fstab How can I save changes during fix file system FEDORA John Sorkin Linux - Distributions 11 06-25-2012 04:43 PM
when does linux switch from realmode file system to protectedmode file system sitthar Linux - General 3 04-08-2006 09:05 AM
How to fix system permissions (suse10) bagpussnz Linux - General 1 04-02-2006 11:23 PM
trying to fix sound onboard system bibilit Mandriva 12 03-10-2004 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration