Bug 83619 - 'diskinfo -t' fails with disks smaller than about 6.3GB.
Summary: 'diskinfo -t' fails with disks smaller than about 6.3GB.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 6.0-BETA1
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-17 17:00 UTC by trasz
Modified: 2018-02-18 07:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description trasz 2005-07-17 17:00:36 UTC
      apparently 'diskinfo -t' does not work with disks smaller than about 6.3GB.  however, instead of falling gracefully, it does it like this:

Seek times:
        Full stroke:      250 iter in   6.251458 sec =   25.006 msec
        Half stroke:    diskinfo: read error or disk too small for test.: Input/output error

How-To-Repeat:       dd if=/dev/zero of=test.img bs=512 seek=10000000 count=1
mdconfig -a -t vnode -f test.img
diskinfo -t /dev/md0
Comment 1 Poul-Henning Kamp 2005-07-17 17:04:09 UTC
In message <200507171557.j6HFv6jf005130@www.freebsd.org>, trasz writes:

>>Description:
>      apparently 'diskinfo -t' does not work with disks smaller than about 6.3GB.  however, instead of falling gracefully, it does it like this:
>

A patch is most welcome to make it fail more gracefully.

Please do not change the logic of the test however, the idea is to
have a constant test-definition.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Comment 2 fullermd 2005-07-17 17:56:17 UTC
> >Description:
>       apparently 'diskinfo -t' does not work with disks smaller than
>       about 6.3GB.  however, instead of falling gracefully, it does
>       it like this:

Datapoints:

da4
        2276762112      # mediasize in bytes (2.1G)
        Half stroke:    diskinfo: read error or disk too small for
        test.: Input/output error

da0
        4569600000      # mediasize in bytes (4.3G)
        Short forward:  diskinfo: read error or disk too small for
        test.: Input/output error
        [ Got farther, note ]

da5
        9173114880      # mediasize in bytes (8.5G)
        [ ran through fine ]


-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.
Comment 3 Hiren Panchasara freebsd_committer freebsd_triage 2017-01-06 08:58:45 UTC
Still valid?
Comment 4 Alex Kozlov freebsd_committer freebsd_triage 2018-02-18 07:19:33 UTC
Works in all supported versions of FreeBSD (2G usb-flash used to verify).