Date: Fri, 22 Oct 2010 12:07:36 +0200 From: Tijl Coosemans <tijl@coosemans.org> To: freebsd-hackers@freebsd.org Cc: Paul Wootton <paul@fletchermoorland.co.uk> Subject: Re: Summary: Re: Spin down HDD after disk sync or before power off Message-ID: <201010221207.42994.tijl@coosemans.org> In-Reply-To: <4CC0BF96.1050806@fletchermoorland.co.uk> References: <201009161742.24228.tijl@coosemans.org> <864ocf7esp.fsf@ds4.des.no> <4CC0BF96.1050806@fletchermoorland.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart14470364.TKtd1VV2N9 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Friday 22 October 2010 00:32:54 Paul Wootton wrote: > Actually, the green series does spin all the way down, well at least > the drive I have does. > Here is the output from one of my drives, that I do not think has > long left to live. >=20 > =3D=3D=3D START OF INFORMATION SECTION =3D=3D=3D > Model Family: Western Digital Caviar Green family > Device Model: WDC WD5000AADS-00M2B0 > Serial Number: WD-WMAV51882791 > Firmware Version: 01.00A01 > User Capacity: 500,107,862,016 bytes > Device is: In smartctl database [for details use: -P show] > ATA Version is: 8 > ATA Standard is: Exact ATA specification draft version not indicated > Local Time is: Thu Oct 21 23:31:35 2010 BST > SMART support is: Available - device has SMART capability. > SMART support is: Enabled > .... > SMART Attributes Data Structure revision number: 16 > Vendor Specific SMART Attributes with Thresholds: > ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE =20 > UPDATED WHEN_FAILED RAW_VALUE > 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail =20 > Always - 0 > 3 Spin_Up_Time 0x0027 111 104 021 Pre-fail =20 > Always - 7425 > 4 Start_Stop_Count 0x0032 100 100 000 Old_age =20 > Always - 98 > 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail =20 > Always - 0 > 7 Seek_Error_Rate 0x002e 100 253 000 Old_age =20 > Always - 0 > 9 Power_On_Hours 0x0032 093 093 000 Old_age =20 > Always - 5295 > 10 Spin_Retry_Count 0x0032 100 253 000 Old_age =20 > Always - 0 > 11 Calibration_Retry_Count 0x0032 100 253 000 Old_age =20 > Always - 0 > 12 Power_Cycle_Count 0x0032 100 100 000 Old_age =20 > Always - 96 > 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age =20 > Always - 95 > 193 Load_Cycle_Count 0x0032 001 001 000 Old_age =20 > Always - 781014 > 194 Temperature_Celsius 0x0022 120 102 000 Old_age =20 > Always - 27 > 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age =20 > Always - 0 > 197 Current_Pending_Sector 0x0032 200 200 000 Old_age =20 > Always - 0 > 198 Offline_Uncorrectable 0x0030 200 200 000 Old_age =20 > Offline - 0 > 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age =20 > Always - 0 > 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age =20 > Offline - 0 >=20 >=20 > The datasheet for these drive=20 > <http://www.wdc.com/wdproducts/library/SpecSheet/ENG/2879-701229.pdf>http= ://www.wdc.com/wdproducts/library/SpecSheet/ENG/2879-701229.pdf=20 > says > "Reliability/Data Integrity > Load/unload cycles (3) 300,000 > Limited Warranty (years) (4) > (3) Controlled unload at ambient condition > (4) The term of the limited warranty my vary by region" >=20 > Also=20 > http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid= =3D5357 > "(drive has been validated to 1 million load/unload cycles without issue)" >=20 > Im already at 781014 load cycles, yet the drive is only about 7 months=20 > old. Doing the math, I am getting a load/unload cycle about every 24.5=20 > seconds > Another 2 months and I will be knocking on for 1 million load/unload=20 > cycles.... >=20 > As DES has already said, for most people the extra load/unload cycles=20 > when rebooting a computer will not be an issue at all and is far more=20 > desirable than an emergency park when powering down =46reeBSD frequently accesses hard disks (log files, flushing dirty memory pages every 30s,...) and laptop drives tend to have aggressive power saving settings by default. That's why your load cycle is so high. To deal with this you should consider installing sysutils/ataidle and adding these lines to /etc/rc.conf: ataidle_enable=3D"YES" ataidle_devices=3D"ad0" ataidle_ad0=3D"-P 0" An alternative is to use atacontrol(8). If you don't mind the spin down when rebooting you can solve the emergency park at shutdown with a simple patch like this: =2D-- sys/dev/ata/ata-disk.c +++ sys/dev/ata/ata-disk.c @@ -193,6 +193,8 @@ =20 if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); + if (atadev->param.support.command1 & ATA_SUPPORT_POWERMGT) + ata_controlcmd(dev, ATA_STANDBY_IMMEDIATE, 0, 0, 0); return 0; } =20 --nextPart14470364.TKtd1VV2N9 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iF4EABEIAAYFAkzBYm4ACgkQfoCS2CCgtisJXQD+PlAZJi3QL8wpsPXXpX2bXrqU 3D+lIIxwF1ALsXuvdpkA/RcOybCbE434hQMWSDMbolvYFsdrzWdydu1rFmmJKlcf =WwZh -----END PGP SIGNATURE----- --nextPart14470364.TKtd1VV2N9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010221207.42994.tijl>