Bug 209443

Summary: [Hyper-V]FreeBSD 10.3 on Windows 2012 server may fail to add/remove a disk by hot plugin
Product: Base System Reporter: Hongjiang <honzhan>
Component: kernAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: Closed FIXED    
Severity: Affects Many People CC: decui, gonzo, kyliel, tablosazi.farahan
Priority: --- Keywords: patch
Version: 10.3-RELEASE   
Hardware: amd64   
OS: Any   
Description Flags
fix the inquiry issue on 10.3 none

Description Hongjiang 2016-05-11 04:02:13 UTC
FreeBSD 10.3 on windows 2012 R2 hyper-v may fail to hot add/remove a SCSI disk. The reproduce steps are:
1. boot the system
2. add a vhd disk through hyperv manager settings: From SCSI Controller, add a new virtual hard disk, select vhd and 1G size. Finally click "Apply"
3. From the hyperv manager console, we can see a new disk is added.
4. repeat the above step 2 and 3 twice to add two disks, but you can only see one hot plugin disk. The first hot plugin disk is missing.

If you use "camcontrol rescan <bus:target:lun>" to rescan the missing device, it will go back. But if you used this command issue twice rescan, the disk may miss again.
Comment 1 Hongjiang 2016-06-27 05:33:03 UTC
Created attachment 171852 [details]
fix the inquiry issue on 10.3

This patch fixed the issue cause by SCSI inquiry command.
Comment 2 vali gholami 2017-12-17 07:12:17 UTC
Comment 3 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 18:50:56 UTC
Looks like patch has been committed in base r302541. Closing as fixed.