[Solved, mostly]: zpool status hangs zfs command, possibly related to spindown

Derrick Ryalls ryallsd at gmail.com
Fri Jan 8 15:15:23 UTC 2010


On Thu, Jan 7, 2010 at 8:01 AM, Derrick Ryalls <ryallsd at gmail.com> wrote:
> Greetings,
>
> uname -a (64bit)
>
>  8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #0: Sun Dec  6 11:23:52 PST 2009
>
> I have a raidz setup with 4x 2TB drives, plus a UFS CF on the IDE
> channel I use to boot off of.  I have an 1TB ZFS (non-raid) drive in
> an attached docking station that I use for nightly backups.  Since 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=ad12
>
> case "$1" in
> start)
>        echo "Spindown SATA disk $DEV after idle for 15 minutes."
>        atacontrol spindown $DEV 900 && dd if=/dev/$DEV of=/dev/null
> count=1 2> /dev/null &
>        ;;
> stop)
>        echo "Spindown of SATA disk $DEV disabled."
>        atacontrol spindown $DEV 0 && dd if=/dev/$DEV of=/dev/null
> count=1 2> /dev/null
>        ;;
> status)
>        atacontrol spindown $DEV
>        ;;
> *)
>        echo "Usage: `basename $0` {start|stop|status}" >&2
>        exit 64
>        ;;
> esac
>
>
> However after running a spindown stop twice within a couple minutes, I
> see this in /var/log/messages:
>
> Jan  7 07:36:54 frodo kernel: ad12: request while spun down, starting.
> Jan  7 07:36:55 frodo kernel: ad12: timeout waiting to issue command
> Jan  7 07:36:55 frodo kernel: ad12: error issuing READ_DMA command
>
> Jan  7 07:38:40 frodo kernel: ad12: timeout waiting to issue command
> Jan  7 07:38:40 frodo kernel: ad12: error issuing READ_DMA command
>
> If I issue a 'zpool status storage' command (main raidz) it returns
> normally.  If I issue 'zpool status' or 'zpool status backup' (backup
> is the drive in the docking station), the command hangs.  '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.  Is 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.  Does 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.


More information about the freebsd-questions mailing list