On Mon, 7 Feb 2011 01:21:11 -0500
> I really hope we aren't as ignorant as what these articles are making us
> appear to be ...
> We will try and not be long winded on this.
> OUR GOAL:
> To add a USB 3TB drive, with a UFS2 fs, to an already running x86 FreeBSD
> 7.3-p1 system.
> PROBLEMS __ The following sections from the FBSD Handbook are erroneous
> and/or not properly working with this device.
> 18.3.1 Using sysinstall(8) __ After all is said and done, we are only left
> with da0s1, da0s2 and da0s3 within /dev.
> 18.3.2 Using Command Line Utilities
> 188.8.131.52 Using Slices __ some of the commands in this section do not yield
> positive results and fail. Example, as seen in the handbook:
> WORKSTATION# dd if=/dev/zero of=/dev/da0 bs=1k count=1
> dd: /dev/da0: Invalid argument
> 1+0 records in
> 0+0 records out
> 0 bytes transferred in 0.000108 secs (0 bytes/sec)
> When we edit the __bs=1k__ to __bs=512k__ this appears to complete
> successfully. Another example:
> WORKSTATION# fdisk -BI da0
> ******* Working on device /dev/da0 *******
> fdisk: /boot/mbr: length must be a multiple of sector size
> Honestly, how does this stuff make it in to the handbook? Lets look at a
> final example from the handbook; how is a novice suppose to know what to
> do in the resulting file after using the following command,
> bsdlabel -e da0s1
> The system we are working on/with __
> WORKSTATION# uname -r
> WORKSTATION# df -h
> Filesystem Size Used Avail Capacity Mounted on
> /dev/ad4s1a 484M 412M 33M 93% /
> devfs 1.0K 1.0K 0B 100% /dev
> /dev/ad4s1f 3.4G 168K 3.2G 0% /tmp
> /dev/ad4s1d 106G 23G 74G 23% /usr
> /dev/ad4s1e 29G 4.3G 22G 16% /var
> USB DEVICE: (3TB)
> da0 at umass-sim0 bus 0 target 0 lun 0
> da0: <Seagate FA GoFlex Desk 0155> Fixed Direct Access SCSI-4 device
> da0: 40.000MB/s transfers
> da0: 2861588MB (732566645 4096 byte sectors: 255H 63S/T 45600C)
> Everyone says read the handbook, then when we do, this is what we get.
I believe there are 2 limits you may be encountering. The disk is larger
than 2TiB and is low-level formatted with 4096 bytes sectors. The 2TiB
limit results from clculations with 32 bit integers and 512 byte sectors.
The large sector size is almost certainly the problem with "dd"...you
can read less than a sector, but an attempt to write less than a sector
will fail. Try bs=4k.
I'm running 8 Stable as of a few days ago. The "fdisk" sources on
this system were updated 11/22/2010, but appear to handle sector sizes only
up to 2048 bytes. I haven't checked to see if it handles disk or partition
sizes above 2TiB, but it doesn't matter, it won't handle your disk properly,
and I doubt that the FBSD 7.3 fdisk would either. There is no option for
sector size, it's a hard-coded limit which is too small.
Bsdlabel may have similar limits. The version on this system was last
modified 09/26/2010. It reads the sectorsize from the disk and therefore
should have no trouble with a 3tb disk. I don't know whether the 7.3
fdisk has these modifications, but with fdisk failing, it doesn't matter.
If you are using the disk only under freebsd you might try using 'bsdlabel'
on the entire disk (da0), but check I suspect your bsdlabel may not be
upgraded yet (check sbin/bsdlabel).
The manual page for 'gpart' claims that it was introduced in 7.0, and I
would think it would be working reasonably by 7.3. It should be able
to handle large disks and partitions with no trouble, and is much easier
to use than the old stuff. You said in your last email that 'gpart show'
showed nothing, but that may be because it had nothing intelligible to
show. If you haven't tried it yet, and the disk contains no data which
you might lose, then try the recipe from the link I gave you. Create
a couple of partitions, then try 'gpart show'.
Alternately, you may try getting recent versions of fdisk and bsdlabel
from cvs or svn, increase the sector size limit in fdisk, and try that
Duane H. Hesser
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"