From owner-freebsd-questions@FreeBSD.ORG Fri Jan 8 15:15:23 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44A01065692 for ; Fri, 8 Jan 2010 15:15:23 +0000 (UTC) (envelope-from ryallsd@gmail.com) Received: from mail-qy0-f176.google.com (mail-qy0-f176.google.com [209.85.221.176]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC4E8FC22 for ; Fri, 8 Jan 2010 15:15:23 +0000 (UTC) Received: by qyk6 with SMTP id 6so8279374qyk.3 for ; Fri, 08 Jan 2010 07:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=pS8HdCr5l2abFhpDZAqaf7AoS7/Z9SikayOeTnROzK4=; b=b7HU28ThewnIsB0StodSs0EVKj5rDWMqDvJyHMVc9/DyIFzXpXLZ9u60vsr6Qjucb3 dkchS0QeiB7/Nwzrzugxv1VyM0I30VNdlhBrLolwlb3/01Lwi4MH0w04PbTCzc582EDA aHshGLfB+uSoOEvHWy59df+xjniz2TaWtUH/g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=pNbOU1dwMeUYTEl4gjIFanu4f18LFWbTi5n67Yw7j+3SPHwkg6HrJfWXY9+5qKUnUl KuAjpFOYhwBxjcpqmYUT1M/q7FqQ4UQgx+Ju1UX3Z/fL4ZyJTAhLqIPL+KCPTXXzrMXQ xYI+UcBO6pCjKju0JCFRjuKmZXtcjaNxHUPOs= MIME-Version: 1.0 Received: by 10.229.131.37 with SMTP id v37mr3098006qcs.27.1262963717397; Fri, 08 Jan 2010 07:15:17 -0800 (PST) Date: Fri, 8 Jan 2010 07:15:17 -0800 Message-ID: From: Derrick Ryalls To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Solved, mostly]: zpool status hangs zfs command, possibly related to spindown X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:15:23 -0000 On Thu, Jan 7, 2010 at 8:01 AM, Derrick Ryalls wrote: > Greetings, > > uname -a (64bit) > > =A08.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #0: Sun Dec =A06 11:23:52 PST 20= 09 > > I have a raidz setup with 4x 2TB drives, plus a UFS CF on the IDE > channel I use to boot off of. =A0I have an 1TB ZFS (non-raid) drive in > an attached docking station that I use for nightly backups. =A0Since the > drive in the docking station has no fan on it, and is only used for > about 2 minutes per day, I have a spindown script added to rc.d: > > #!/bin/sh > > DEV=3Dad12 > > case "$1" in > start) > =A0 =A0 =A0 =A0echo "Spindown SATA disk $DEV after idle for 15 minutes." > =A0 =A0 =A0 =A0atacontrol spindown $DEV 900 && dd if=3D/dev/$DEV of=3D/de= v/null > count=3D1 2> /dev/null & > =A0 =A0 =A0 =A0;; > stop) > =A0 =A0 =A0 =A0echo "Spindown of SATA disk $DEV disabled." > =A0 =A0 =A0 =A0atacontrol spindown $DEV 0 && dd if=3D/dev/$DEV of=3D/dev/= null > count=3D1 2> /dev/null > =A0 =A0 =A0 =A0;; > status) > =A0 =A0 =A0 =A0atacontrol spindown $DEV > =A0 =A0 =A0 =A0;; > *) > =A0 =A0 =A0 =A0echo "Usage: `basename $0` {start|stop|status}" >&2 > =A0 =A0 =A0 =A0exit 64 > =A0 =A0 =A0 =A0;; > esac > > > However after running a spindown stop twice within a couple minutes, I > see this in /var/log/messages: > > Jan =A07 07:36:54 frodo kernel: ad12: request while spun down, starting. > Jan =A07 07:36:55 frodo kernel: ad12: timeout waiting to issue command > Jan =A07 07:36:55 frodo kernel: ad12: error issuing READ_DMA command > > Jan =A07 07:38:40 frodo kernel: ad12: timeout waiting to issue command > Jan =A07 07:38:40 frodo kernel: ad12: error issuing READ_DMA command > > If I issue a 'zpool status storage' command (main raidz) it returns > normally. =A0If I issue 'zpool status' or 'zpool status backup' (backup > is the drive in the docking station), the command hangs. =A0'zfs list' > also does not return nor do zfs mounting commands associated with the > backup drive. > > When I was using 7.x (without ZFS), I was able to use spindown and the > drive would spin up when being used, then shut down after the > requisite inactivity time. =A0Is this no longer recommended, or have I > hit a bug/regression in the ata controller? > > I am remote to the machine right now, so I am hesitant to reboot it to > get the spundown drive back up and running. =A0Does anyone know of a way > to kick start a spundown drive so it is mountable (as a short term > fix) and the proper way to spin up/down the drive for 8.x (for a long > term fix). > > TIA, > > Derrick > Replying to my own thread. Turned out to be a hardware problem - the eSATA plug had become slightly dislodged from the docking station explaining why FreeBSD couldn't properly talk to the drive. Wonder if this uncovers a hotswap issue with either the hardware or the software. It seems like the device should have been removed from /dev when the cable came out rather than the ZFS tools hanging when trying to read... In any case, my backups are running again and I am once again getting daily report mails, so the need for me to investigate this further has dropped.