From owner-freebsd-questions@freebsd.org Tue Aug 25 14:21:26 2015 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 5285799A98D for ; Tue, 25 Aug 2015 14:21:26 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2E6CD for ; Tue, 25 Aug 2015 14:21:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-38-7.dynamic.qsc.de [92.195.38.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id ADA89278D4; Tue, 25 Aug 2015 16:21:22 +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 t7PELMsr002408; Tue, 25 Aug 2015 16:21:22 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 25 Aug 2015 16:21:22 +0200 From: Polytropon To: Chris Stankevitz Cc: freebsd-questions Subject: Re: Stop using a SATA drive Message-Id: <20150825162122.b770fc6a.freebsd@edvax.de> In-Reply-To: References: <20150824214252.53aa04c6.freebsd@edvax.de> 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-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2015 14:21:26 -0000 On Mon, 24 Aug 2015 15:15:26 -0700, Chris Stankevitz wrote: > On Mon, Aug 24, 2015 at 12:42 PM, Polytropon wrote: > > Ye olde atacontrol had a "detach" option. Its equivalent > > is "camcontrol stop" which you have discovered. This should > > be sufficient. > > > > However, I'm doing this with SATA and external USB disks > > a lot: Issue "sync", call umount, give it some seconds > > to actually complete (!) those tasks, and then power it > > off (external power supply off for USB, combined plug > > removed from SATA disk). No problems so far. > > Polytropon, > > Thank you. I've been doing the same... but I assumed/hoped there was > more I could do. I also shutdown smartd before pulling the drive, and > start smartd afterwards. I hope there are not others. ("hope" is a > common theme here... which is why I'm writing to the list) The "problem" is that the PC (and let's face it: most x86-based server hardware can be summarized with "PC", too) does not have a "programmable infrastructure" for power control. It would need to consist of two parts: the electric/electronic part that allows you to switch on and off several power lines inside the system (and maybe even out of the system), and an interface in _software_ that can be accessed by system daemons and user programs (an API). For example, mainframe and midrange systems _have_ this ability. The SPCN (system power control network) inside an AS/400 for example has such a component. First, only the system console and a part of the power supply will be powered; when you then tell the system to boot, the main processor - inactive until now! - will be started, the disks will be powered up, and the expansion components will be started. At system shutdown time, the whole procedure reverses, just leaving the console running. As far as I remember, selectively "taking down" a disk (to be replaced) was also possible from within software... > I didn't know that the heads were parked when the power is cut... but > that is a relief to hear. This is what happens when you detach a USB hard disk. The drive will spin up as soon as _power_ is available - no need for a real connection to a computer! And when the power is cut, the heads will slide back into parking position where they will be locked (for safely moving the disk). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...