Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2015 08:21:02 +0000
From:      Hongjiang Zhang <honzhan@microsoft.com>
To:        "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>
Subject:   A lot of invalid SCSI hard disks were listed under /dev/ad
Message-ID:  <e14271c9409348cd95b2f9ef8f456d68@SG2PR3002MB0106.064d.mgd.msft.net>

next in thread | raw e-mail | index | archive | help
I installed FreeBSD 10.2 on Windows 10, and found there are quite a lot of =
invalid hard disk under /dev/. "camcontrol devlist" also lists those invali=
d disk. See the following. But FreeBSD installed on windows 8, there is no =
such confusing information.
>From the "dmesg", I observed there are a lot non-existing SCSI disks, and o=
nly da1 is the real disk.

It looks like "lun" number is wrong, I want to understand the logic of hype=
r-v for storage, but I have no idea of how to use cam_*** API. From the cod=
e, the logic is extracted as follows. But I don't know how to use cam_** or=
 xpt_** API.
Does anyone know how can I get help? Or shall I ask such questions in other=
 maillist?

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dsource=
 code logic in **_attach() function=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
struct cam_devq *devq =3D cam_simq_alloc();
        sc->hs_sim =3D cam_sim_alloc(storvsc_action,
                                storvsc_poll,
                                sc->hs_drv_props->drv_name,
                                sc,
                                sc->hs_unit,
                                &sc->hs_lock, 1,
                                sc->hs_drv_props->drv_max_ios_per_target,
                                devq);
                   xpt_bus_register(sc->hs_sim, dev, 0);
        if (xpt_create_path(&sc->hs_path, /*periph*/NULL,
                 cam_sim_path(sc->hs_sim),
                CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) !=3D CAM_REQ_CMP) {
                xpt_bus_deregister(cam_sim_path(sc->hs_sim));
                cam_sim_free(sc->hs_sim, /*free_devq*/TRUE);
                                     xpt_bus_deregister(cam_sim_path(sc->hs=
_sim));
                   }
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D/dev/da*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
root@honzhan-dev2:/usr/src # ll /dev/da*
crw-r-----  1 root  operator  0x5f Nov 23 18:45 /dev/da0
crw-r-----  1 root  operator  0x60 Nov 23 18:45 /dev/da1
crw-r-----  1 root  operator  0x69 Nov 23 18:45 /dev/da10
crw-r-----  1 root  operator  0x6a Nov 23 18:45 /dev/da11
crw-r-----  1 root  operator  0x6b Nov 23 18:45 /dev/da12
crw-r-----  1 root  operator  0x6c Nov 23 18:45 /dev/da13
crw-r-----  1 root  operator  0x6d Nov 23 18:45 /dev/da14
crw-r-----  1 root  operator  0x6e Nov 23 18:45 /dev/da15
crw-r-----  1 root  operator  0x70 Nov 23 18:45 /dev/da1p1
crw-r-----  1 root  operator  0x71 Nov 23 18:45 /dev/da1p2
crw-r-----  1 root  operator  0x72 Nov 23 18:45 /dev/da1p3
crw-r-----  1 root  operator  0x61 Nov 23 18:45 /dev/da2
crw-r-----  1 root  operator  0x62 Nov 23 18:45 /dev/da3
crw-r-----  1 root  operator  0x63 Nov 23 18:45 /dev/da4
crw-r-----  1 root  operator  0x64 Nov 23 18:45 /dev/da5
crw-r-----  1 root  operator  0x65 Nov 23 18:45 /dev/da6
crw-r-----  1 root  operator  0x66 Nov 23 18:45 /dev/da7
crw-r-----  1 root  operator  0x67 Nov 23 18:45 /dev/da8
crw-r-----  1 root  operator  0x68 Nov 23 18:45 /dev/da9

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcamcon=
trol devlist=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
root@honzhan-dev2:/usr/src # camcontrol devlist
<Msft Virtual CD/ROM 1.0>          at scbus0 target 0 lun 0 (cd0,pass0)
<Msft Virtual Disk 1.0>            at scbus1 target 0 lun 0 (da1,pass2)
<  >                               at scbus1 target 1 lun 1 (da0,pass1)
<  >                               at scbus2 target 0 lun 1 (da2,pass3)
<  >                               at scbus2 target 0 lun 2 (da4,pass5)
<  >                               at scbus2 target 0 lun 3 (da6,pass7)
<  >                               at scbus2 target 0 lun 4 (da8,pass9)
<  >                               at scbus2 target 0 lun 5 (da10,pass11)
<  >                               at scbus2 target 0 lun 6 (da12,pass13)
<  >                               at scbus2 target 0 lun 7 (da14,pass15)
<  >                               at scbus2 target 1 lun 1 (da3,pass4)
<  >                               at scbus2 target 1 lun 2 (da5,pass6)
<  >                               at scbus2 target 1 lun 3 (da7,pass8)
<  >                               at scbus2 target 1 lun 4 (da9,pass10)
<  >                               at scbus2 target 1 lun 5 (da11,pass12)
<  >                               at scbus2 target 1 lun 6 (da13,pass14)
<  >                               at scbus2 target 1 lun 7 (da15,pass16)

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Ddmesg=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
da0 at blkvsc0 bus 0 scbus1 target 1 lun 1
da0: <  > Fixed Direct Access SCSI device
da0: 300.000MB/s transfers
da0: 0MB (0 512 byte sectors: 0H 0S/T 0C)
da0: Delete methods: <NONE(*)>
da1 at blkvsc0 bus 0 scbus1 target 0 lun 0
da1: <Msft Virtual Disk 1.0> Fixed Direct Access SPC-3 SCSI device
da1: 300.000MB/s transfers
da1: 20480MB (41943040 512 byte sectors: 255H 63S/T 2610C)
pass3 at storvsc1 bus 0 scbus2 target 0 lun 1
pass3: <  > Fixed Direct Access SCSI device
pass3: 300.000MB/s transfers
(probe0:storvsc1:0:0:2): Down reving Protocol Version from 4 to 0?
da2 at storvsc1 bus 0 scbus2 target 0 lun 1
da2: <  > Fixed Direct Access SCSI device
da2: 300.000MB/s transfers
da2: 0MB (0 512 byte sectors: 0H 0S/T 0C)
da2: Delete methods: <NONE(*)>
pass4 at storvsc1 bus 0 scbus2 target 1 lun 1
pass4: <  > Fixed Direct Access SCSI device
pass4: 300.000MB/s transfers
(probe1:storvsc1:0:1:2): Down reving Protocol Version from 4 to 0?
da3 at storvsc1 bus 0 scbus2 target 1 lun 1
da3: <  > Fixed Direct Access SCSI device
da3: 300.000MB/s transfers
da3: 0MB (0 512 byte sectors: 0H 0S/T 0C)
da3: Delete methods: <NONE(*)>
(probe0:storvsc1:0:0:2): Down reving Protocol Version from 4 to 0?
(probe1:storvsc1:0:1:2): Down reving Protocol Version from 4 to 0?
pass5 at storvsc1 bus 0 scbus2 target 0 lun 2
pass5: <  > Fixed Direct Access SCSI device
pass5: 300.000MB/s transfers
(probe0:storvsc1:0:0:3): Down reving Protocol Version from 4 to 0?
da4 at storvsc1 bus 0 scbus2 target 0 lun 2
da4: <  > Fixed Direct Access SCSI device
da4: 300.000MB/s transfers
da4: 0MB (0 512 byte sectors: 0H 0S/T 0C)
da4: Delete methods: <NONE(*)>
pass6 at storvsc1 bus 0 scbus2 target 1 lun 2
pass6: <  > Fixed Direct Access SCSI device
pass6: 300.000MB/s transfers
(probe1:storvsc1:0:1:3): Down reving Protocol Version from 4 to 0?
da5 at storvsc1 bus 0 scbus2 target 1 lun 2
da5: <  > Fixed Direct Access SCSI device
da5: 300.000MB/s transfers
da5: 0MB (0 512 byte sectors: 0H 0S/T 0C)
da5: Delete methods: <NONE(*)>
(probe0:storvsc1:0:0:3): Down reving Protocol Version from 4 to 0?
(probe1:storvsc1:0:1:3): Down reving Protocol Version from 4 to 0?
pass7 at storvsc1 bus 0 scbus2 target 0 lun 3
pass7: <  > Fixed Direct Access SCSI device
pass7: 300.000MB/s transfers
(probe0:storvsc1:0:0:4): Down reving Protocol Version from 4 to 0?
da6 at storvsc1 bus 0 scbus2 target 0 lun 3
da6: <  > Fixed Direct Access SCSI device
da6: 300.000MB/s transfers
da6: 0MB (0 512 byte sectors: 0H 0S/T 0C)
da6: Delete methods: <NONE(*)>
...



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