NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/49457: 'atactl sleep' loses drive



The following reply was made to PR kern/49457; it has been noted by GNATS.

From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/49457: 'atactl sleep' loses drive
Date: Mon, 8 Dec 2014 18:19:58 +0100

 On Sun, Dec 07, 2014 at 06:20:00PM +0000, Hauke Fath wrote:
 > 	The machine has a second sata disk that is only used as an
 > 	Amanda spool disk, and unmounted otherwise. The backup scripts
 > 	run 'atactl sleep' on the drive to power it down after
 > 	work. 
 > 
 > 	This worked without a problem on netbsd-6, but irreversibly
 > 	puts the drive in a coma on netbsd-7.
 > 
 > >How-To-Repeat:
 > 
 > [hauke@pizza] ~ # atactl wd1 checkpower
 > Current power status: Standby mode
 > [hauke@pizza] ~ # atactl wd1 sleep
 > load: 0.06  cmd: atactl 4012 [ahcicmd] 0.00u 0.00s 0% 0k
 > [hauke@pizza] ~ # atactl wd1 checkpower
 > atactl: wd1: Input/output error
 > [hauke@pizza] ~ # 
 > 
 > The console logs
 > 
 > wd1: wd_flushcache: status=0x5128<TIMEOU>
 > wd1: IDENTIFY failed
 > 
 > At this point, only a reboot will bring the drive back.
 
 that's strange, no more message from the kernel ?
 What would e.g. a disklabel -r show ?
 
 tested on a netbsd-7 host with ahcisata controller here:
 yquem# atactl wd0 checkpower
 Current power status: Active mode
 yquem# atactl wd0 sleep
 yquem# atactl wd0 checkpower
 ATA command timed out
 [this is expected, a drive in sleep doesn't reply to any ATA command - only
 a reset will wake it up]
 yquem# disklabel -r wd0
 [several seconds delay, I can hear the drive spin up]
 # /dev/rwd0d:
 type: unknown
 disk: ST500DM002-1BD1
 label: 
 [...]
 
 and the kernel said while the several seconds delay:
 wd0d: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
 wd0: soft error (corrected)
 
 The failed wd_flushcache in your case looks suspicious; if the partition
 is unmounted I'm not sure why a flushcache would be queued at this point.
 
 -- 
 Manuel Bouyer <bouyer%antioche.eu.org@localhost>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
 


Home | Main Index | Thread Index | Old Index