Skip to contentSkip to conversation

Structure needs cleaning - Seagate Expansion External HDD 2TB USB

DISCUSSION Marcel z maleho mesta 3 participants 3 messages May 15, 2010 – May 16, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm new to Linux (still got Win XP running on my laptops :(, but installed on my old machine Fedora 12, which looks really good :)

I have got a problem with my external Seagate Expansion External HDD 2TB USB drive which has been connected to my NAS Bufallo LinkStation Mini.

I did have to disconnect the USB drive from NAS one day and since then it would not be recognised by NAS. So have tried some Win tools, but the USB drive has got XFS file system.

When I plug it to pc running Fedora 12, Palimpsest Disk Utility see the Hard Drive, but when I attempt to Mount the drive Error mounting device - Unknown error msg. comes up. Details:
Error mounting: mount: Structure needs cleaning.

Have googled it: http://xfs.org/index.php/XFS_FAQ#Q:_I_see_applications_returning_error_990_or_.22Structure_needs_cleaning.22.2C_what_is_wrong.3F
and tried xfs_repair /dev/sdb1 and xfs_check /dev/sdb1 and can Mount the disk and all the folders in root apart from few files are ok "copied into Lost+Found Folder", but the most important one "DVBgrab" with about 400Gb of data :( (each file is between 1 and 2 Gb)

Are those files gone, or is there a chance that they can be somehow recovered with combination of xfs_repair commands?

Thanx in advance.

Marcel

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 11 lines · Marcel z maleho mesta

Hi all,

I'm new to Linux (still got Win XP running on my laptops :(, but installed on my old machine Fedora 12, which looks really good :)

I have got a problem with my external Seagate Expansion External HDD 2TB USB drive which has been connected to my NAS Bufallo LinkStation Mini.

I did have to disconnect the USB drive from NAS one day and since then it would not be recognised by NAS. So have tried some Win tools, but the USB drive has got XFS file system.

Ok, so some unknown thing went wrong by this point.

Quoted 5 lines

When I plug it to pc running Fedora 12, Palimpsest Disk Utility see the Hard Drive, but when I attempt to Mount the drive Error mounting device
- Unknown error msg. comes up.
Details:
Error mounting: mount: Structure needs cleaning.

At that point, type "dmesg" to see what error is in the kernel log.

Quoted 6 lines

Have googled it:
http://xfs.org/index.php/XFS_FAQ#Q:_I_see_applications_returning_error_990_or_.22Structure_needs_cleaning.22.2C_what_is_wrong.3F
and tried xfs_repair /dev/sdb1 and xfs_check /dev/sdb1 and can Mount the disk and all the folders in root apart from few files are ok "copied into Lost+Found Folder", but the most important one "DVBgrab" with about 400Gb of data :( (each file is between 1 and 2 Gb)

I didn't parse that very well, I'm afraid, but - either your files are where they should be, or they are under lost+found, or they are more or less lost, though some sort of pattern search over the drive might work.

Quoted 2 lines

Are those files gone, or is there a chance that they can be somehow recovered with combination of xfs_repair commands?

You've already run repair, there is no magical "recover my lost data" option to it, I'm afraid.

There's really not much to go on here, other than "something corrupted your filesystem," probably while attached to the buffalo device, and it sounds like some data was lost.

-Eric

Quoted 4 lines

Thanx in advance.

Marcel

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
In reply to Marcel z maleho mesta

Le Sat, 15 May 2010 22:31:17 +0100 vous écriviez:

Quoted 2 lines

but the most important one "DVBgrab" with about
400Gb of data :( (each file is between 1 and 2 Gb)

Don't write anything to your drive. Here is a perl script I wrote to find back lost DV files from a huge corrupted array. Mount some other place to save the found files to /mnt/destination, then run the script passing the device to search as parameter.

#!/usr/bin/perl
use strict;
use warnings;

$|=1 ;

my ( $file ) = @ARGV;

my $blocksize = 4096 ;

my $lookupstring = pack "H*", "1F0700" ;
my $regexp = qr/^(.*?)($lookupstring.*)$/s ;

open ( my $raid, "< $file" ) or die "can't open $file \n" ;

{
	my $block ;
	my $offset = 0 ;
	my $nextblock = 0;
	my $testfile;
	
	# frame size is 1440000 bytes
	my $framebuffer1 = '' ;
		
	my $outnumber = 0;
	seek $raid, $offset, 0 or die ;
	
	while ( my $readbytes = read $raid, $block, $blocksize ) {
		$offset += $readbytes ;
		
		print "* offset : $offset\n" unless ( $offset %
1073741824 ) ; 
		if ( length $framebuffer1 == 0 ) {
			if ( $block =~ m/$regexp/ ) {
				print "found, file $outnumber
offset $offset\n"; $framebuffer1 = $2 ;
			}
		} elsif ( length $framebuffer1 < 144000 - $blocksize ) {
			$framebuffer1 .= $block ;
			print "file head inside : offset $offset\n" if
( $block =~ m/$regexp/ ) ; } elsif ( length $framebuffer1 == 144000 -
$blocksize ) { $framebuffer1 .= $block ;
		} else {
			$framebuffer1 .= substr( $block, 0, ( 144000 -

length $framebuffer1 ) ) ;

			if ( not $testfile ) {
				print "OPEN\n";
				open $testfile,

">/mnt/destination/out". sprintf ("%09d", $outnumber) . ".dv" or die "can't write file $outnumber "; }

			print $testfile $framebuffer1 ;
			
			if ( $block =~ m/$regexp/ ) {
				print "found, file $outnumber
offset $offset\n"; $framebuffer1 = $2 ;
			} else {
				print "CLOSE\n" ;
				close $testfile ;
				undef $testfile ;
				$framebuffer1 = '' ;
				$outnumber++;
			}
		}

	}
}		
Signature · 11 lines
------------------------------------------------------------------------
Emmanuel Florac     |   Direction technique
                    |   Intellique
                    |	<[email protected]>
                    |   +33 1 78 94 84 02
------------------------------------------------------------------------

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs