Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2009 20:38:13 -0800
From:      "Guojun Jin" <gjin@ubicom.com>
To:        <freebsd-usb@freebsd.org>, <bugs@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: 8.0-RC USB/FS problem
Message-ID:  <CB2DD11991B27C4F99935E6229450D3203950A26@STORK.scenix.com>
References:  <CB2DD11991B27C4F99935E6229450D3203950A1C@STORK.scenix.com> <CB2DD11991B27C4F99935E6229450D3203950A1D@STORK.scenix.com> <200911181213.34112.hselasky@c2i.net> <CB2DD11991B27C4F99935E6229450D3203950A23@STORK.scenix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Tried on the USB hard drive:

Deleted slice 3 and recreated slice 3 with two partitions s3d and s3e.
Was happy because successfully did dump/restore on s3d, and thought it =
just partition format issue;
but system crashed during dump/restore on s3e, and partition lost the =
file system type.

wolf# mount /dev/da0s3e /mnt
WARNING: /mnt was not properly dismounted
/mnt: mount pending error: blocks 35968 files 0
wolf# fsck da0s3e
fsck: Could not determine filesystem type
wolf# bsdlabel da0s3
# /dev/da0s3:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 175735035        0    unused        0     0         # "raw" part, =
don't edi
t
  d: 18874368        0    4.2BSD        0     0     0
  e: 156860667 18874368    4.2BSD        0     0     0

Therefore, tried directly use fsck_ufs on both USB hard drive and USB =
stick to get file system
clean up. All data got back now.

The machine has run with FreeBSD 6.1 all the way to 7.2 without such =
problem.
How can we determine what could go wrong in 8.0? FS or USB.

By the way, IDE to IDE dump/restore seems not having such problem at =
this point, although
one of IDE drive experienced partition recognizing problem, which went =
away after deleting
slices and recreating slices.


-----Original Message-----
From: Guojun Jin
Sent: Sat 11/21/2009 7:40 PM
To: Hans Petter Selasky; freebsd-usb@freebsd.org
Cc: freebsd-stable@freebsd.org; questions@freebsd.org
Subject: 8.0-RC USB problem -- how to recover a damaged USB stick
=20
It seems this is more serious problem in 8.0, and I hope it could be =
resolved before a formal release. I can help to diagnose this if people =
need more information (this is destructive).

I have picked a USB stick (DataTraveler 2GB), that has two partitions s0 =
for DOS and s1 for FreeBSD.
Both USB hard drive and the USB stick have worked under FreeBSD 6.2, =
6.3, 6.4 and 7.2 for a few years without any problem.

Plugged USB stick in 8.0-RC and mounted it on /mnt; then
untar a file, tarred one day ago from FreeBSD 6.3 machine onto stick,to =
a IDE drive then tar it
back to the USB stick.
During tar writting from IDE to USB stick, did "ls /mnt", and "tar" =
paused and "ls" hangs.
A couple of minutes later, ls comes back, but tar still pauses.

Hit ^C on tar process around 14:30, it took another minutes to stop the =
process. Tried tar again,
and system disallowed to write on  the USB stick. "ls" shows all file =
still there (probably cached inods).

Went out for a few hours, and came back found /var/log/message are =
flooded with following message:
-rw-r--r--  1 root  wheel  167181 Nov 21 19:02 messages
-rw-r--r--  1 root  wheel    7390 Nov 21 18:00 messages.0.bz2
-rw-r--r--  1 root  wheel    7509 Nov 21 17:00 messages.1.bz2
-rw-r--r--  1 root  wheel    9365 Nov 21 16:00 messages.2.bz2
-rw-r--r--  1 root  wheel   20598 Nov 21 15:00 messages.3.bz2

Nov 21 18:00:00 wolf newsyslog[2635]: logfile turned over due to =
size>384K
Nov 21 18:00:27 wolf kernel: =
g_vfs_done():da0s2[WRITE(offset=3D625688576, length=3D1
31072)]error =3D 5
Nov 21 18:00:27 wolf kernel: =
g_vfs_done():da0s2[WRITE(offset=3D625819648, length=3D1
31072)]error =3D 5
.....
Nov 21 18:19:03 wolf kernel: =
g_vfs_done():da0s2[WRITE(offset=3D524451840, length=3D1
6384)]error =3D 5
Nov 21 18:19:33 wolf kernel: g_vfs_done():da0s2[WRITE(offset=3D5586944, =
length=3D204
8)]error =3D 5
Nov 21 18:19:33 wolf kernel: g_vfs_done():da0s2[WRITE(offset=3D65536, =
length=3D2048)
]error =3D 5
Nov 21 18:19:33 wolf kernel: g_vfs_done():da0s2[WRITE(offset=3D114688, =
length=3D1638
4)]error =3D 5
Nov 21 18:20:05 wolf kernel: =
g_vfs_done():da0s2[WRITE(offset=3D349700096, length=3D1

and has to reboot the system, and reboot was not able to umount =
everything (boot up message):

Nov 21 18:24:03 wolf kernel: da0: <Kingston DataTraveler 2.0 1.00> =
Removable Dir
ect Access SCSI-2 device
Nov 21 18:24:03 wolf kernel: da0: 40.000MB/s transfers
Nov 21 18:24:03 wolf kernel: da0: 1947MB (3987456 512 byte sectors: 255H =
63S/T 2
48C)
Nov 21 18:24:03 wolf kernel: WARNING: / was not properly dismounted
Nov 21 18:24:03 wolf kernel: WARNING: /data was not properly dismounted
Nov 21 18:24:03 wolf kernel: WARNING: /home was not properly dismounted
Nov 21 18:24:03 wolf kernel: WARNING: /tmp was not properly dismounted
Nov 21 18:24:03 wolf kernel: WARNING: /usr was not properly dismounted
...

# mount /dev/da0s2 /mnt
mount: /dev/da0s2 : Operation not permitted

The USB stick cannot be mount under any FreeBSD OS now, and everything =
on the drive has lost.

Does anyone know if it is possible to revocer such damaged USB stick?

-----Original Message-----
From: Hans Petter Selasky [mailto:hselasky@c2i.net]
Sent: Wed 11/18/2009 3:13 AM
To: freebsd-usb@freebsd.org
Cc: Guojun Jin; freebsd-stable@freebsd.org; questions@freebsd.org
Subject: Re: 8.0-RC3 USB lock up on mounting two partitions from one USB =
drive
=20
Hi,

I'm not sure if this is an USB issue or not. If you get READ/WRITE =
errors and=20
the drive simply dies then it might be the case. Else it is a system =
issue.

There are quirks for mass storage which you can add to=20
sys/dev/usb/storage/umass.c .

--HPS

On Wednesday 18 November 2009 08:33:07 Guojun Jin wrote:
> Did newfs on those partition and made things worsen -- restore =
completely
> fails: (I had experienced another similar problem on an IDE, which =
works
> well for 6.4 and 7.2, but 8.0.) This dirve works fine under FreeBSD =
6.4.
>
> Is something new in 8.0 making disk partition schema changed?
>
> g_vfs_done():da0s3d[READ(offset=3D98304, length=3D16384)]error =3D 6
> g_vfs_done():da0s3d[WRITE(offset=3D192806912, length=3D16384)]error =
=3D 6
> fopen: Device not configured
> cannot create save file ./restoresymtable for symbol table
> abort? [yn] (da0:umass-sim0:0:0:0): Synchronize cache failed, status =
=3D=3D
> 0xa, scs i status =3D=3D 0x0
> (da0:umass-sim0:0:0:0): removing device entry
> ugen1.2: <DMI> at usbus1
> umass0: <DMI Ultra HDD, class 0/0, rev 2.00/1.19, addr 2> on usbus1
> umass0:  SCSI over Bulk-Only; quirks =3D 0x0000
> umass0:0:0:-1: Attached to scbus0
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <DMI Ultra HDD 1.19> Fixed Direct Access SCSI-0 device
> da0: 40.000MB/s transfers
> da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C)
> Device da0s3d went missing before all of the data could be written to =
it;
> expect data loss.
>
>     99  23:19   sysinstall
>    100  23:20   newfs /dev/da0s3d
>    101  23:20   newfs /dev/da0s3e
>    102  23:21   mount /dev/da0s3d /mnt
>    103  23:21   cd /mnt
>    104  23:21   dump -0f - /home | restore -rf -
>    105  23:27   history 15
>
>
>
> -----Original Message-----
> From: Guojun Jin
> Sent: Tue 11/17/2009 11:05 PM
> To: freebsd-stable@freebsd.org
> Cc: questions@freebsd.org; freebsd-usb@freebsd.org
> Subject: 8.0-RC3 USB lock up on mounting two partitions from one USB =
drive
>
> When mounting two partitions from a USB dirve, it can cause the drive
> access lock up for a long time. Details:
>
> Terminal 1 --
> term1# mount /dev/da0s3d  /mnt
> term1# cd /mnt ; rm -fr *
>
> when rm starts, go to terminal 2 and do:
>
> term2# mount /dev/da0s3e /dist ### this will hanging for a long time =
and
> USB hard drive activity light is off. After more than 1-2 minutes, =
mount
> returns, and the drive activity light is blinking, thus removing is =
going
> on.
>
> term2# ls /dist   ### this will cause dUSB dirve hanging again -- no
> avtivity. Similarly, ls will finish in a couple of miniutes or longer, =
the
> rm command continues; but for a while, the drive activity will stop =
again.
>
> Reboot machine, repeat the above steps, and result will be the same. =
Reboot
> machine again, and just mount one partition, then doing "rm -rf *" =
without
> involve the second partition, rm will finish quickly.
>
> Has anyone obseved this behave on 8.0-RC?
>
> -Jin






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CB2DD11991B27C4F99935E6229450D3203950A26>