LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-17-2009, 07:05 PM   #1
mocambo
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Rep: Reputation: 0
File directory corrupted on external EXT3 USB drive


I have problem with corrupted directory and corrupted files inside this directory on external USB hard drive with EXT3 filesystem.

I fall into problems when I trying to delete directory with huge content, but somehow connection disconnected and deletion process hanged on.

Now this directory contains a big mess - I cant delete remains of this directory content. Also some remain subdirectories changed to files and files have random sizes and types.

All other content of this drive seems OK.

So how I can continue removing this unwanted directory ? Formatting whole drive is not preferred solution. I cant format whole drive every time unexpected disconnection happens.

Is there any proof method to resolve this problem ?
 
Old 06-17-2009, 07:18 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Did you try repairing the filesystem with fsck?
 
Old 06-17-2009, 08:00 PM   #3
mocambo
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MS3FGX View Post
Did you try repairing the filesystem with fsck?
Yes, I've used fsck with next option.

# fsck.ext3 -p /dev/sdc2
/dev/sdc2 contains a file system with errors, check forced.
/dev/sdc2: Inode 16814, i_blocks is 400, should be 392. FIXED.
/dev/sdc2: Special (device/socket/fifo/symlink) file (inode 188160) has immutable
or append-only flag set. IGNORED.
/dev/sdc2: Special (device/socket/fifo) inode 188160 has non-zero size. FIXED.
/dev/sdc2: Special (device/socket/fifo) inode 227169 has non-zero size. FIXED.
/dev/sdc2: Special (device/socket/fifo) inode 227201 has non-zero size. FIXED.
...........
/dev/sdc2: Special (device/socket/fifo) inode 317631 has non-zero size. FIXED.
/dev/sdc2: Inode 335234, i_size is 7740398491874099712, should be 0. FIXED.
/dev/sdc2: Inode 335234, i_blocks is 3, should be 0. FIXED.
/dev/sdc2: Inode 335235 has compression flag set on filesystem without compression support.

/dev/sdc2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)

So should I use now "fsck.ext3 -y /dev/sdc2" without worrying loosing other data?
 
Old 06-17-2009, 09:37 PM   #4
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
In this case, I do `e2fsck -v -y /dev/sdc2` every time (on my IDE HDDs) but haven't experienced exactly your case on a USB drive, though it should be the same. Also, I use Ext2, not Ext3. To date (2.5 years) this has worked fine, and the odd time I lost a file somewhere, I found it in /lost+found and restored it.

Something to consider ****might**** be the "sync" or "dirsync" options in your fstab file entry for this drive. I have read conflicting reports about whether or not using sync can cause excessive usage on disks; it is definitely not recommended for solid state (flash) disks, but I have used it without trouble for some of my hard-disks. If you expect regular accidental disconnections of this device, it might be worth the risk for you.

NOTE::: Use this advice, all of it, at your own risk. It works for me, but if it doesn't work for you, it isn't my fault

Good luck!

Sasha

Last edited by GrapefruiTgirl; 06-17-2009 at 09:38 PM. Reason: small edit
 
  


Reply

Tags
corrupted, directory, ext3


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
External USB Drive Ext3 Fsck Error on Boot macgyver007 Linux - Desktop 8 08-22-2009 12:02 AM
How do I unsave a Gnome-saved password of my ext3 external USB hard-drive? simonsharry Linux - Newbie 5 02-15-2009 02:15 AM
ext3 RAID 1 on a USB External Two Disk Hard Drive - Possible? Runge_Kutta Linux - Hardware 3 08-17-2007 06:28 PM
USB external drive: NTFS/FAT32 detected, ext3 not blanks77 Linux - Hardware 7 04-25-2006 08:45 PM
ext3 partition on external USB hard drive mounted, but only root access allowed leontini Linux - Hardware 4 02-17-2006 01:54 AM


All times are GMT -5. The time now is 03:17 PM.

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