Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 2010 07:15:17 -0800
From:      Derrick Ryalls <ryallsd@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   [Solved, mostly]: zpool status hangs zfs command, possibly related to spindown
Message-ID:  <d5eb95fc1001080715p399447c0r1a8a25b7cfb382da@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
On Thu, Jan 7, 2010 at 8:01 AM, Derrick Ryalls <ryallsd@gmail.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d5eb95fc1001080715p399447c0r1a8a25b7cfb382da>