External hard disk through FireWire or USB
Cai, Quanqing
caiquanqing at gmail.com
Fri Oct 14 16:44:13 PDT 2005
Hi guys,
Recently I got problems to use LaCie disk under FreeBSD 6.0, actually I did
some trick to use LaCie disk under FreeBSD 6.0 through FireWire. Here is
detail:
This info is from dmesg:
da0 at sbp0 bus 0 target 0 lun 0
da0: <LaCie Gr LaCie FW800 Big 0105> Fixed Direct Access SCSI-4 device
da0: 50.000MB/s transfers
da0: 476950MB (976794335 512 byte sectors: 255H 63S/T 60802C)
If you notice, you will find that 255H*63S*60802C=976784130!=976794335 in
dmesg.
So next I did the following:
dd if=/dev/zero of=/dev/da0 bs=1k count=1
bsdlabel -w da0
bsdlabel -e da0 # and I found there is one /dev/da0a partition.
newfs -L LaCie1 -U -o time /dev/da0a
I got this error:
newfs: wtfs: 512 bytes at sector 976794318: Invalid argument
So I run bsdlabel -e da0 and find something in this info:
# /dev/da0:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 976794319 16 unused 0 0
c: 976794335 0 unused 0 0 # "raw" part, don't edit
You can see system use 976794335, not 976784130 as total sectors!
So I changed it to 976784130 as following:
a: 976784114 16 unused 0 0
c: 976784130 0 unused 0 0 # "raw" part, don't edit
Ignore the waring message, and newfs going ok.
I copied one big gig size file and everything goes ok!
I tried this LaCie disk through USB also, same problem.
Here is my question, I know the da0's H/S/C param info is from LaCie, and
the number of total sectors is from LaCie disk too. Is this a problem or
just normal, I mean wrong number of total sectors? If this is a problem, is
there a way to fix this problem?
BR
Cai, Quanqing
More information about the freebsd-scsi
mailing list