From owner-freebsd-questions@freebsd.org Sat Apr 1 13:14:36 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D72FDD28DC5 for ; Sat, 1 Apr 2017 13:14:36 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay15.qsc.de (mailrelay15.qsc.de [212.99.187.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5109D9C6 for ; Sat, 1 Apr 2017 13:14:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay15.qsc.de; Sat, 01 Apr 2017 15:14:27 +0200 Received: from r56.edvax.de (port-92-195-127-117.dynamic.qsc.de [92.195.127.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 1EA9A3CC3F; Sat, 1 Apr 2017 15:14:25 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v31DEO3X003328; Sat, 1 Apr 2017 15:14:24 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 1 Apr 2017 15:14:24 +0200 From: Polytropon To: Alexey Pereklad Cc: freebsd-questions@freebsd.org Subject: Re: Can't replace disk on LSI HBA Message-Id: <20170401151424.56b44a2c.freebsd@edvax.de> In-Reply-To: <013e2507-dbc5-8d75-d68d-ac139ed0b0bb@at-hacker.in> References: <013e2507-dbc5-8d75-d68d-ac139ed0b0bb@at-hacker.in> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay15.qsc.de with 01F726A00DD X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.2366 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 13:14:36 -0000 On Sat, 1 Apr 2017 15:42:09 +0300, Alexey Pereklad wrote: > I have FreeBSD 11.0 (11.0-RELEASE-p1 #1 r312693) here. Trying to test > hot disk replacement on LSI 9341-8i > > Put disk into offline state does not work: > > # MegaCli -pdoffline -physdrv\[29:23\] -a1 -NoLog > Adapter: 1: Failed to change PD state at EnclId-29 SlotId-23. > Exit Code: 0x01 > > I've tried to remove da9 device without putting it offline. Here is the > log: > > # grep detach /var/log/messages > > Apr 1 14:31:02 dc1-nfs-06 kernel: da9: s/n > WD-WMC6N0D3S29A detached > Apr 1 14:31:03 dc1-nfs-06 kernel: ses0: detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da2: s/n > WD-WMC5C0D72CZC detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da4: s/n > WD-WMC5C0D18DVW detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da6: s/n > WD-WMC5C0D366LH detached > Apr 1 14:31:03 dc1-nfs-06 kernel: ses1: detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da11: s/n > WD-WMC1P0F4DY9M detached > Apr 1 14:31:03 dc1-nfs-06 kernel: ses0: detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da3: s/n > WD-WMC5C0D20R1C detached > Apr 1 14:31:03 dc1-nfs-06 kernel: s/n WD-WCC1P5ZVVPTD0): detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da7: s/n > WD-WMC6N0D11C71 detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da15: s/n > WD-WMC6N0D9F2KA detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da8: s/n > WD-WMC6N0D3PJDS detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da10: s/n > WD-WMC6N0E30R5D detached > Apr 1 14:31:03 dc1-nfs-06 kernel: da12: s/n > WD-WMC6N0D97TPZ detached > Apr 1 14:31:58 dc1-nfs-06 kernel: ses0: detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da4: s/n > WD-WMC5C0D18DVW detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da2: s/n > WD-WMC5C0D72CZC detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da6: s/n > WD-WMC5C0D366LH detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da8: s/n > WD-WMC6N0D3PJDS detached > Apr 1 14:31:58 dc1-nfs-06 kernel: ses1: detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da5: s/n > WD-WCC1P5ZVVPTD detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da3: s/n > WD-WMC5C0D20R1C detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da9: s/n > WD-WMC1P0F4DY9M detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da7: s/n > WD-WMC6N0D11C71 detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da10: s/n > WD-WMC6N0E30R5D detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da12: s/n > WD-WMC6N0D97TPZ detached > Apr 1 14:31:58 dc1-nfs-06 kernel: da11: s/n > WD-WMC6N0D9F2KA detached > > As you can see, all the drives has been detached. So is there any way to > replase failed drives on FreeBSD with LSI HBAs without reboot? Did you try to use "camcontrol"? As the devices are represented to regular "da" devices to the system by the HBA, maybe you could use "camcontrol stop" to detach the disk from the system prior to physically removing it? Check "camcontrol devlist" for the correct LUN of the disk you wish to replace. I haven't tested this approach, though. See "man camcontrol" for details and examples. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...