You are not logged in.

#1 2012-11-02 06:09:02

Eugene
Member
Registered: 2012-11-02
Posts: 9

Arch corrupts FS on external USB drive.

Good day almighty All,

I have a Dell Latitude E6520 laptop with SSD drive, which is probably unrelated to the problem.

Recently I decided to install Arch linux on it, but before that, being a bloody smart person, I decided to back up existing windows partition and CentOS filesystem to the external HDD connected with some noname SATA-to-USB connector.
(Actually it has a name, which is "Bus 002 Device 009: ID 14cd:6116 Super Top M6116 SATA Bridge").
Enclose has my old 500GB Segate in it with LVM partition.

So the box was booted with CentOS installed, first 2048 sectors of the drive and windows partitions were dumped with dd to the files on external HDD.
Could not tell which FS was on the volume, but most probably ext3.

After that I installed Arch (base, base-devel, grub as per installation manual), changed CentOS GRUB-0.9 to GRUB2, rebooted into arch, was unpleasantly surprised by the missing ifconfig, rebooted back into Arch usb, installed net-tools, rebooted into Arch, installed various small things like vim and KDE minimal, added missing ttf-dejavu, still could not boot into KDM - startx only.

Everything was going well so far.

Then it happened.
I mounted my USB drive from Arch and tried to dump on it CentOS partition.
Somewhere at the mark of 30-40Gb from the start  I got Input/Output errors and that's it - partition is dead.

When I tried  to remount it I've got:

mount: wrong fs type, bad option, bad superblock on /dev/mapper/lenovo01-data,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

I ran fsck on other laptop (Fedora 17) and got file system fixed but empty (well, lots of errors, everything was linked under lost+found).

RIP my backup wink (I have a copy on the storage and this one will be accessed via network only wink

I re-created FS (ext3), copied on it couple gigs of test files, connected drive to dell, mounted FS, "ls" the dir, all good.
Unmounted FS, mounted again - get what is quoted above - I/O errors.

The same drive on the same laptop works without any problem with installed CentOS and live GRML so it is not a hardware itself.

So far:

1. external drive can be mounted without problem when it is just connected to Arch
2. After some data traffic it starts to produce I/O errors.
3. When good FS is unmounted and then mounted again the story is the same - I/O errors.
4. As soon as it happened I cannot change FS on drive, I cannot change partition table and so on. fdisk and mkfs completed without error but FS is not there and attempt to mount produces the error above.

Below is some info about installation:

System is installed on encrypted with Luks LVM partition.
External HDD is not encrypted.

[root@darkstar ~]# uname -a
Linux darkstar 3.6.3-1-ARCH #1 SMP PREEMPT Mon Oct 22 10:23:56 CEST 2012 x86_64 GNU/Linux
[root@darkstar ~]# pacman -Suy
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
there is nothing to do
[root@darkstar ~]#

# dmesg after connection of USB drive

[Nov 2 14:08] usb 2-1.1: new high-speed USB device number 8 using ehci_hcd
[  +0.085473] scsi8 : usb-storage 2-1.1:1.0
[  +1.002053] scsi 8:0:0:0: Direct-Access        Mass  Storage Device        PQ: 0 ANSI: 0
[  +0.001279] sd 8:0:0:0: [sdb] 976773166 512-byte logical blocks: (500 GB/465 GiB)
[  +0.000664] sd 8:0:0:0: [sdb] Write Protect is off
[  +0.000011] sd 8:0:0:0: [sdb] Mode Sense: 03 00 00 00
[  +0.000562] sd 8:0:0:0: [sdb] No Caching mode page present
[  +0.000011] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[  +0.002354] sd 8:0:0:0: [sdb] No Caching mode page present
[  +0.000011] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[  +0.049185]  sdb: sdb1 sdb2 sdb3
[  +0.003149] sd 8:0:0:0: [sdb] No Caching mode page present
[  +0.000022] sd 8:0:0:0: [sdb] Assuming drive cache: write through
[  +0.000006] sd 8:0:0:0: [sdb] Attached SCSI disk
[Nov 2 14:09] usb 2-1.1: reset high-speed USB device number 8 using ehci_hcd

And this is dmesg after I tried to mount fs created on other box.
There was also XFS volume on the same VG.

[Nov 2 14:15] EXT4-fs (dm-8): mounted filesystem without journal. Opts: (null)
[Nov 2 14:16] EXT4-fs (dm-8): VFS: Can't find ext4 filesystem
[  +0.036964] EXT4-fs (dm-8): VFS: Can't find ext4 filesystem
[  +0.026500] EXT4-fs (dm-8): VFS: Can't find ext4 filesystem
[  +0.040551] XFS (dm-8): bad magic number
[  +0.000023] XFS (dm-8): SB validate failed

Will appreciate any help,
Thanks,
Eugene.

Offline

#2 2012-11-04 18:36:10

poliocertes
Member
From: Poland
Registered: 2010-02-19
Posts: 26

Re: Arch corrupts FS on external USB drive.

The same issue here. Under last Fedora and every windows drive is working fine. Under arch after mounting, data traffic and umounting is impossible to remount. Even mkfs can't format drive. Could it be a connector issue? Mine is the same as Eugene's - Super Top M6116 SATA Bridge.

Last edited by poliocertes (2012-11-07 07:40:55)

Offline

#3 2012-11-06 22:39:02

Eugene
Member
Registered: 2012-11-02
Posts: 9

Re: Arch corrupts FS on external USB drive.

I installed kernel 3.6.3-1 from EPEL under CentOS.
Same story - it does corrupt the file system if I try to mount it.
It does corrupt partition table if I try to change it.

The same story is with CentOS on 3.6.5-1.

So the issue seems to be with the kernel.
Device happily works with kernel 2.6.x

Did not check it with other devices, do not have time to swap drives and do not want to risk with data any more smile.

Offline

#4 2012-11-07 07:48:34

poliocertes
Member
From: Poland
Registered: 2010-02-19
Posts: 26

Re: Arch corrupts FS on external USB drive.

Eugene wrote:

Did not check it with other devices,

Other drives are working fine. Also tried other drives in the same case  and got the same error, Could it be a cheap drive bay problem?

Offline

#5 2012-11-25 21:55:19

Eugene
Member
Registered: 2012-11-02
Posts: 9

Re: Arch corrupts FS on external USB drive.

Little bit of testing,  just out of curiousity - do not have time to dig into it, sorry.
It puts garbage starting with "USBC" in first 32 bytes (the rest of the string varies) and then skips first 4K.
Tested it with CentOS - at least its 2.6 kernel works as expected.

[root@darkstar test]# uname -a                                                                             
Linux darkstar 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@darkstar test]# perl -e 'print "a"x5120' |dd bs=512 count=10 of=/dev/sdb                             
10+0 records in                                                                                             
10+0 records out                                                                                           
5120 bytes (5.1 kB) copied, 0.258486 s, 19.8 kB/s                                                           
[root@darkstar test]# dd bs=512 count=10 if=/dev/sdb status=noxfer |od -tax1                               
0000000   a   a   a   a   a   a   a   a   a   a   a   a   a   a   a   a
         61  61  61  61  61  61  61  61  61  61  61  61  61  61  61  61
*
0012000
10+0 records in
10+0 records out
[root@darkstar test]# uname -a
Linux darkstar 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


[root@darkstar test]# uname -a
Linux darkstar 3.6.7-1.el6.elrepo.x86_64 #1 SMP Sun Nov 18 08:35:06 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@darkstar test]# perl -e 'print "7"x5120' |dd bs=512 count=10 of=/dev/sdb
10+0 records in
10+0 records out
5120 bytes (5.1 kB) copied, 0.303432 s, 16.9 kB/s
[root@darkstar test]# dd bs=512 count=10 if=/dev/sdb status=noxfer |od -tax1
10+0 records in
10+0 records out
0000000   U   S   B   C   : soh nul nul nul dc4 nul nul nul nul  nl   *
         55  53  42  43  ba  01  00  00  00  14  00  00  00  00  0a  2a
0000020 nul nul nul nul nul nul nul  nl nul nul nul nul nul nul nul   ^
         00  00  00  00  00  00  00  0a  00  00  00  00  00  00  00  de
0000040   a   a   a   a   a   a   a   a   a   a   a   a   a   a   a   a
         61  61  61  61  61  61  61  61  61  61  61  61  61  61  61  61
*
0001000   7   7   7   7   7   7   7   7   7   7   7   7   7   7   7   7
         37  37  37  37  37  37  37  37  37  37  37  37  37  37  37  37
*
0012000
[root@darkstar test]# uname -a
Linux darkstar 3.6.7-1.el6.elrepo.x86_64 #1 SMP Sun Nov 18 08:35:06 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@darkstar test]#

Last edited by Eugene (2012-11-26 01:15:46)

Offline

#6 2012-11-25 22:12:26

Eugene
Member
Registered: 2012-11-02
Posts: 9

Re: Arch corrupts FS on external USB drive.

I've got an update. My bcdDevice is 2.20 as well.

cavalierrant wrote:

Hello,
If you are still interested, I may have found the cause of the HDD enclosure corrupting your drive.
http://code.metager.de/source/history/l … _cypress.h
the patch submitted on 2010-10-19 causes problems with my enclosure, having the same id as yours. After removing that patch, my drive works as expected.

I've already contacted the person who submitted the patch, and his bcdDevice number is 1.60, could you please check yours, so we can retarget the patch only to those actually affected.
Mine is the following:
$ lsusb -vd 14cd:6116
(...)
  idVendor           0x14cd Super Top
  idProduct          0x6116 M6116 SATA Bridge
  bcdDevice            2.20

Thanks for your help,

Offline

#7 2012-12-10 14:30:36

poliocertes
Member
From: Poland
Registered: 2010-02-19
Posts: 26

Re: Arch corrupts FS on external USB drive.

After removing patch drive is working fine.

Last edited by poliocertes (2012-12-11 16:57:52)

Offline

Board footer

Powered by FluxBB