# Unknown error with a USB hard disk?



## HL1234 (Jan 11, 2013)

Hello,

I try to use an external 2 TB USB hard disk, and like to format the third partition on it with *F*reeBSD.

When working with this disk I get this error in /var/log/messages:

`# bsdlabel /dev/da0s3`

In messages:


```
Jan 11 21:28:54  kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 54 c0 0 0 10 0 
Jan 11 21:28:54  kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Jan 11 21:28:54  kernel: (da0:umass-sim0:0:0:0): Retrying command
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 54 c0 0 0 10 0 
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): Retrying command
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 54 c0 0 0 10 0 
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): Retrying command
Jan 11 21:28:55  kernel: ugen0.2: <vendor 0x05e3> at usbus0 (disconnected)
Jan 11 21:28:55  kernel: uhub1: at uhub0, port 1, addr 2 (disconnected)
Jan 11 21:28:55  kernel: ugen0.3: <Seagate> at usbus0 (disconnected)
Jan 11 21:28:55  kernel: umass0: at uhub1, port 4, addr 3 (disconnected)
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 54 c0 0 0 10 0 
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): Retrying command
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): lost device - 1 outstanding, 2 refs
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): oustanding 0
Jan 11 21:28:55  kernel: (pass3:umass-sim0:0:0:0): passdevgonecb: devfs entry is gone
Jan 11 21:28:55  kernel: (da0:umass-sim0:0:0:0): removing device entry
Jan 11 21:28:56  kernel: ugen0.2: <vendor 0x05e3> at usbus0
Jan 11 21:28:56  kernel: uhub1: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2> on usbus0
Jan 11 21:28:57  kernel: uhub1: 4 ports with 4 removable, self powered
Jan 11 21:28:59  kernel: ugen0.3: <Seagate> at usbus0
Jan 11 21:28:59  kernel: umass0: <Seagate Backup+ Desk, class 0/0, rev 2.10/1.00, addr 3> on usbus0
Jan 11 21:28:59  kernel: umass0:  SCSI over Bulk-Only; quirks = 0x0100
Jan 11 21:28:59  kernel: umass0:3:0:-1: Attached to scbus3
Jan 11 21:28:59  kernel: da0 at umass-sim0 bus 0 scbus3 target 0 lun 0
Jan 11 21:28:59  kernel: da0: <Seagate Backup+ Desk 0503> Fixed Direct Access SCSI-6 device 
Jan 11 21:28:59  kernel: da0: 1.000MB/s transfers
Jan 11 21:28:59  kernel: da0: 1907729MB (3907029167 512 byte sectors: 255H 63S/T 243201C)
```

Can anybody tell me what that means and/or what there happens? And every time I try to format the partition with newfs it hangs?

`# newfs /dev/da0s3`


```
# newfs /dev/da0s3
/dev/da0s3: 267264.0MB (547356656 sectors) block size 32768, fragment size 4096
        using 362 cylinder groups of 740.00MB, 23680 blks, 47360 inodes.
super-block backups (for fsck -b #) at:
 192, 1515712, 3031232, 4546752, 6062272, 7577792, 9093312, 10608832, 12124352, 13639872, 15155392,
 16670912, 18186432, 19701952, 21217472, 22732992,
 24248512, 25764032, 27279552, 28795072, 30310592, 31826112, 33341632, 34857152, 36372672, 37888192,
 39403712, 40919232, 42434752, 43950272, 45465792,
 46981312, 48496832, 50012352, 51527872, 53043392, 54558912, 56074432, 57589952, 59105472, 60620992,
```

*F*reeBSD freezes here and I must put the PC off and on to start it again.


----------



## HL1234 (Jan 11, 2013)

Here is the error message when it hangs (sorry, I forget above)

```
ugen0.2: <Seagate> at usbus0 (disconnected)
umass0: at uhub0, port1, addr2 (disconnected)
(da0:umass-sim0:0:0:0) lost device - 1 outstanding)
(da0:umass-sim0:0:0:0) outstanding 0)
```


----------



## kpa (Jan 12, 2013)

It's somehow disconnecting in the middle of I/O operations. Does it have its own power supply? A disk of that size might not work on bus power if it doesn't have the power supply connected.


----------



## HL1234 (Jan 12, 2013)

Hello kpa,
Thanks for your answer. I have tried both. First I used the USB interface at the PC. Then I used an external USB-Hub with seperate power supply. But it made no difference.

In between I have booted on a second PC (where I had format Partition 1+2 with NTFS) a PCBSD live cd. Then I tried to format the 3. partition /dev/da0s3 of these external hard disk "Seagate Backup Plus / 2TB" with
`# newfs /dev/da0s3`

It seems this has now worked. But I could not mount it. Then I do it again with sysinstall --> post configuration --> label --> d[elete] --> c[reate] --> w[rite]
I've had before give the command:
`# sysctl kern.geom.debugflags=16`
to make it writable, because I'm not in single user mode.

It seems again that this has worked. Then I mounted the now created 3. partition /dev/da0s3d to /mnt/bck (before: # makedir /mnt/bck) and copy some files on it. With # ls I could see the file. Then I reboot the PCBSD-Live CD and test the external partition again. But the already-created partition can not be accessed, after I mount it: error message is "Bad file descriptor" ???

One thing I have not told, is, that the external hard disk comes with USB 3.0, and my PC has only USB 2.0 and the other one. I used as freeBSD home server, is a Intel Pentium III (Coppermine) 733Mhz, which comes maybe with USB 1.0. But as I read, the Seagate should be downward compatible.

So after formatting with two PCs fails, I think it could be that FreeBSD can not work with this Seagate Plus Desktop Drive: http://www.seagate.com/external-hard-drives/desktop-hard-drives/backup-plus-desk/ ?

Do you have any idea what I can do know to use this hard disk for dump backups?


----------



## wblock@ (Jan 12, 2013)

Please don't change kern.geom.debugflags.  It is a safety feature that prevents destroying a mounted partition.

After rebooting (important: that's a clean shutdown using shutdown(8) or the menus in PC-BSD):

```
# fsck -t ufs -y /dev/da0s3
# mount /dev/da0s3 /mnt
# ls /mnt
```

It could be a USB problem, there were people asking about problems with external USB 3.0 Seagate drives on one of the mailing lists recently.  I looked but could not find those messages now.  The freebsd-usb mailing list would be the right place to ask.  But try the commands above first.


----------



## HL1234 (Jan 13, 2013)

Hello all,
thank you for trying to help me. But I thing I give up with this Seagte USB device. I have now created a FAT32 partition (a 3. Partition as described above) with a second PC. Copy some data on it and try to mount it with the freeBSD PC. 
`# mount -t msdosfs -o large /dev/da0s3 /mnt/bckup`
Same Problem - it hangs:

error message from console:

```
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 5d 28 0 0 8 0
(da0:umass-sim0:0:0:0): CAM status: CCB reques completed with an error
(da0:umass-sim0:0:0:0): Retrying command
ugen0.2: <Seagate> at usbus0 (disconnected)
umass0: at uhub0, port 1, addr 2 (disconnected)
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 5d 28 0 0 8 0
(da0:umass-sim0:0:0:0): CAM status: CCB reques completed with an error
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 5d 28 0 0 8 0
(da0:umass-sim0:0:0:0): CAM status: Section Timeout
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 c8 32 5d 28 0 0 8 0
(da0:umass-sim0:0:0:0): CAM status: Section Timeout
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): lost device - 1 outstanding, 2 refs
(da0:umass-sim0:0:0:0): outstanding 0
(pass3:da0:umass-sim0:0:0:0): passdevgonecb devfs entry is gone
```
Here the system hang up. I have to press the power knobe for a new boot.

I found in the sources cam.c where the messages seems to be made: http://svn.freebsd.org/base/user/eri/pf45/head/sys/cam/cam.c and this info: http://bintree.net/freebsd/de/de1/cam_8c.html But i dislike to grubber deeper, what it could be.
Maybe my information about the error will give the developer of cam.c (and code around) some ideas how Seagates hard disks can get to work with freeBSD.
Thanx again.


----------



## wblock@ (Jan 13, 2013)

The developer will probably not see that information unless you enter a PR or ask on the freebsd-usb mailing list.


----------



## HL1234 (Jan 24, 2013)

Thank You wblock,
I have give today a problem report. With mailing lists I've been unexperienced, and I get a mass of eMail when I subscribed to that, and not only for the queston I asked.
Harald


----------



## wblock@ (Jan 24, 2013)

You don't have to subscribe to a mailing list.  The web PR form is enough, and you will get email with responses to that PR.  However, it does put your address out on the web, so some people use free email or redirectors.  It's important to use an address that actually works, because a developer may need to respond for feedback.


----------

