Removing a hotplug-able drive tray connected to a hotplug-aware controller does not always properly destroy the device. Mainboard: Supermicro X9SRL-F (http://www.supermicro.nl/products/motherboard/xeon/c600/x9srl-f.cfm) CPU: Intel Xeon E5-1620v2 (http://ark.intel.com/products/75779/) Example output when hotplug fails: <remove from hotplug bay> Nov 15 03:16:40 homer kernel: ada1 at ahcich1 bus 0 scbus3 target 0 lun 0 Nov 15 03:16:40 homer kernel: ada1: <SAMSUNG MZ7PD120HAFV-000DA DXM02W1Q> s/n xxx detached <insert into hotplug bay> Nov 15 03:20:32 homer kernel: cam_periph_alloc: attempt to re-allocate valid device ada1 rejected flags 0x118 refcount 2 Note the absence of 'Periph destroyed' in the above output. If a port successfully handles hotplugging, it will keep doing so until next reboot, at which point it may or may not support hotplugging again. Relevant dmesg output is attached Fix: Patch attached with submission follows:
I've tried to reproduce the problem with FreeBSD 9.2-RELEASE (AMD64), but have so far been unable to. I've tried 20 times across 5 reboots. I therefore believe this may be a regression. The hardware in question will be available for experimentation for a couple of weeks, so please let me know if there's anything else I should do to pinpoint the error.
Following suggestions from mav@ on the FreeBSD forums ( http://forums.freebsd.org/showthread.php?t=43238), I've discovered that the problem was somehow caused by SWAP being enabled on the device which was being unplugged. Considering that 'top' output indicated no swap was being used, and that the system had nearly 63 GB unused memory at the time, I would be surprised if anything was swapped. Although the issue is not what I initially thought it was, I still believe this is a problem which needs resolving, as a hdd dying for whatever reason should not make a port unavailable for what seems like an arbitary period of time. (I have not yet managed to make the port work again by any other way than a reboot, but I only left the system running for up to 15 minutes)
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Jun 10 16:09:20 <kern.crit> proxy kernel: cam_periph_alloc: attempt to re-allocate valid device ada1 rejected flags 0x118 refcount 2 Jun 10 16:09:20 <kern.crit> proxy kernel: adaasync: Unable to attach to new device due to status 0x6 13.0-RELEASE-p1 FreeBSD 13.0-RELEASE-p1 One disk is sometimes disapperas. Usually camcontrol reset/rescan works, but now after the reset/rescan device have appeared in devlist, but ada device was not created.