Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


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

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
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

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

Original Poster
Rep: Reputation: 0
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.

(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
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
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!


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


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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration