Ubuntu也许将成为你的笔记本硬盘杀手

最新ubuntu/linux/开源新闻或者其它IT相关资讯
回复
头像
dogfox
论坛版主
帖子: 5311
注册时间: 2006-09-02 14:18
来自: 汉桑城
联系:

Ubuntu也许将成为你的笔记本硬盘杀手

#1

帖子 dogfox » 2007-11-01 16:59

Ubuntu系统的ACPI电源管理默认设置存在问题,当用户切换到电池供电模式时,/etc/acpi/power.sh向所有块设备发出一个hdparm -B 1命令,这会导致出现频繁的负荷循环(load cycles)。发现Bug #59695的用户称仅在100小时内就出现了7000次负荷循环。大多数笔记本硬盘只能承受至多60万次此类循环,这意味着它会大幅度减少笔记本硬盘的寿命。SATA 硬盘用户可以输入“smartctl -d ata -a /dev/sda”命令来查看负荷循环次数,但需要先安装Smartmontools软件包(apt-get下)。

https://launchpad.net/bug59695.html
全世界linux爱好者联合起来 !
kickoff
帖子: 2
注册时间: 2007-11-01 17:05

#2

帖子 kickoff » 2007-11-01 17:11

真的假的 刚刚买了新的 笔记本硬盘 7200.2 200G
别吓唬我
头像
rushui999
帖子: 52
注册时间: 2007-04-27 21:03

#3

帖子 rushui999 » 2007-11-01 19:04

我也怕啊,本本坏了可就糟了啊 :shock:
头像
woodlinux
帖子: 158
注册时间: 2006-07-15 7:29
来自: 宁波北仑
联系:

#4

帖子 woodlinux » 2007-11-01 19:15

这是不是硬盘转速哟,你一楼的是不是搞错了!现在用的硬盘转速大都是7200转的哟!
junglej
帖子: 162
注册时间: 2007-09-08 14:25

转贴前请google一下

#5

帖子 junglej » 2007-11-01 21:24

https://launchpad.net/bug59695.html

Bug #59695, first reported on2006-09-09 by Gilles Schintgen

从这个BUG被提交到现在,ubuntu都经过了6.10(06年10月发布).7.04(07年4月发布)和7.10(07年10月18日发布)3个正式发布版了。

您不如贴个win98的xxx bug 来的有意义。

再说了,WINDOWS那么多次谋杀都死不了,这点算啥,起码知道的话,通过修改参数什么的可以解决。

如果是windows系统出现这种BUG,只有等无敌的ms发布下个补丁。


[s:148][s:148][s:148]
上次由 junglej 在 2007-11-01 21:26,总共编辑 1 次。
liaxiz
帖子: 49
注册时间: 2007-05-26 23:57
联系:

#6

帖子 liaxiz » 2007-11-01 21:24

密切关注中!
恳请某位达人能够解释下呢,最好用中文,有解决办法么
要不然,这个消息在Ubuntu中造成的恐慌就太严重了
liaxiz
帖子: 49
注册时间: 2007-05-26 23:57
联系:

#7

帖子 liaxiz » 2007-11-01 21:52

或许大家可以看下这篇文章,是一位ubuntu开发者写的,或许对大家有点启示,原文引自:
http://www.linux-hero.com/rant/ubuntu-h ... xplosions/
原文:
For starters, let me just say WOW! I’m completely overwhelmed at the responses my last article article has gotten. As I type this it’s rapidly approaching 1000 diggs, which is something I never even envisioned. When I sat down to write this article, three things were true:

1. It was 3am.
2. I actually was writing the article more on the basis that I had read a trouble ticket that I didn’t understand a piece of lingo in (hard drive load/unload cycles)
3. I was in my underwear.

So imagine my surprise when I finished the article, in which the main goal was to make me tired enough to sleep so I wouldn’t be completely useless at work the next day, and posted it that the digs started coming in almost immediately. I saw that I had 8 before I went to bed, and didn’t think anything about it until the next night, when I checked and saw over 400. Insanity. At any rate, to make it short, let me say Thank You to all of you (even the trolls!) if for nothing else participating in a lively discussion. Enough mushy community group hug crap. Let’s get down to work.

Of all the responses that were posted in response to my first article, this one was far and away the most relevant. (Especially when you consider the fact that after some research I realized the guy was a lead Ubuntu developer!)

“The situation is somewhat less clear than you might think from the article, but the basic takeaway message is that Ubuntu doesn't touch your hard drive power management settings by default. In almost all cases, it's more likely to be your BIOS or the firmware on your hard drive.

The script that's executed when you plug or unplug your laptop is /etc/acpi/power.sh. The relevant sections are:

function laptop_mode_enable {
...
$HDPARM -S $SPINDOWN_TIME /dev/$drive 2>/dev/null
$HDPARM -B 1 /dev/$drive 2>/dev/null
}

That is, when the laptop_mode_enable function is called, we set the drive power parameters. Now, by default laptop_mode_enable isn't called:

if [ x$ENABLE_LAPTOP_MODE = xtrue ]; then
(sleep 5 && laptop_mode_enable)&
fi

because ENABLE_LAPTOP_MODE is false in the default install (check /etc/default/acpi-support). This means that, by default, we do not alter the hard drive power settings. In other words, the APM settings that your drive is using in Ubuntu are the ones that your BIOS programmed into it when the computer started. This is supported by the fact that people see this issue after resuming from suspend. We don't touch the hard drive settings at that point, so the only way it can occur is if your BIOS or drive default to this behaviour.

If you enable laptop mode, then we will enable aggressive power management on the drive and that may lead to some reduction in hard drive lifespan. That's a fairly inevitable consequence of laptop mode, since it only makes sense if the laptop enages in aggressive power management. But, as I said, that's not the default behaviour of Ubuntu.

There's certainly an argument that we should work around BIOSes, but in general our assumption has been that your hardware manufacturer has a better idea what your computer is capable of than we do. If a laptop manufacturer configures your drive to save power at the cost of life expectancy, then that's probably something you should ask your laptop manufacturer about”

So let me put this out there in capital letters, because I NEVER wanted any semblance of bad publicity for Ubuntu. UBUNTU DOES NOT OVERWORK YOUR HARD DRIVE UNLESS IT IS IN LAPTOP MODE.

How can you tell if your machine is in laptop mode? Easy.

root@linux-hero.com:/ grep ENABLE_LAPTOP_MODE /etc/default/acpi-support

If the returned value is true, your machine is in laptop mode and you may wish to alter your power management settings accordingly. I have not tested this, however I imagine you can choose a less aggressive number in the aforementioned script /etc/acpi/power.sh at the line that reads:
<code>$HDPARM -B 1 /dev/$drive 2>/dev/null</code>

When doing so, keep in mind that 255 completely disables power management, and 1 is the most aggressive setting. Find a happy medium that works for your laptop if you’re interested in striking a balance between battery life and hard drive longevity.

If it comes back false, you’re fine. It should also be noted per the developer that laptop mode is off by default. I’m imagining though, that many people when going through the install see the advanced power management stuff in the list of packages and turn it on without thinking about it. Perhaps a small warning, even in the /etc/default/acpi-support file is in order?

I’m going to close with the statement that I truly love Ubuntu, and it is in my opinion the best distro available right now, and I never wanted bad publicity for them. This article was originally just an excuse for me to do some research and learn about hard drive load/unload cycles. All the rest of this is just 17,000 hits of side effects. (Gentoo users, I like that one a lot too… I swear. No flame wars please.)

红色的部分应该可以说明问题了,是bios或者硬件的驱动所做的设置,在启动的时候覆盖了Ubuntu的设置,按照作者的意思,硬件厂商应该更加了解硬件的工作情况,所以Ubuntu并未改变这些设置,若是出现楼主所述的问题,应该询问硬件厂商的。
这只是一家之言,仅供参考!!!
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#8

帖子 skyx » 2007-11-03 11:41

no security measure is worth anything if an attacker has physical access to the machine
头像
Tenyears
帖子: 2245
注册时间: 2005-06-30 15:46
来自: 成都

#9

帖子 Tenyears » 2007-11-03 11:57

我的笔记本已经50多万次了,不到一年,大多数时候用ubuntu,偶尔用xp。

但是现在7.10默认设置下,两个小时都没有增加1次

反而是xp,2个小时居然load了将近200次!
Humanity to others // 己所不欲,勿施与人
Laptop: ThinkPad X220 --- Win7 Home / Ubuntu 12.04
Desktop: Win7/Ubuntu 12.04
Server: Ubuntu12.04
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#10

帖子 skyx » 2007-11-03 11:58

Tenyears 写了:我的笔记本已经50多万次了,不到一年,大多数时候用ubuntu,偶尔用xp。

但是现在7.10默认设置下,两个小时都没有增加1次

反而是xp,2个小时居然load了将近200次!




Tenyears 写了:我的笔记本已经50多万次了,不到一年,大多数时候用ubuntu,偶尔用xp。

但是现在7.10默认设置下,两个小时都没有增加1次

反而是xp,2个小时居然load了将近200次!
楼上硬盘挂时一定是要报下道

:lol: :lol:
no security measure is worth anything if an attacker has physical access to the machine
头像
Tenyears
帖子: 2245
注册时间: 2005-06-30 15:46
来自: 成都

#11

帖子 Tenyears » 2007-11-03 20:46

skyx 写了:
楼上硬盘挂时一定是要报下道

:lol: :lol:
:em89 :em90 :em91 :em92
Humanity to others // 己所不欲,勿施与人
Laptop: ThinkPad X220 --- Win7 Home / Ubuntu 12.04
Desktop: Win7/Ubuntu 12.04
Server: Ubuntu12.04
头像
drivel
帖子: 1918
注册时间: 2006-07-08 9:21
来自: University of Science and Technology Beijing
联系:

#12

帖子 drivel » 2007-11-04 0:09

193 Load_Cycle_Count 0x0012 090 090 000 Old_age Always - 102095
头像
mybestlover
帖子: 34
注册时间: 2007-10-21 10:50

#13

帖子 mybestlover » 2007-11-20 8:51

I insist on using ubuntu and I believe it is safe ,stable and so on.
wanglijuncode
帖子: 6
注册时间: 2007-11-21 13:40

#14

帖子 wanglijuncode » 2007-11-21 13:49

楼主说话 不调查 , 太可耻了 ,说什么 先调查下, 我的 机器装xp的时候 硬盘狂响,硬盘灯狂亮, 可装了ubuntu 之后,就没有出现这种情况,
头像
qqttdh
帖子: 896
注册时间: 2007-07-20 22:15

#15

帖子 qqttdh » 2007-11-22 18:56

wanglijuncode 写了:楼主说话 不调查 , 太可耻了 ,说什么 先调查下, 我的 机器装xp的时候 硬盘狂响,硬盘灯狂亮, 可装了ubuntu 之后,就没有出现这种情况,
这个和应用软件有关~~~这个bug也只和ibm和dell的某些机子有关~~~主要是由于
他们的bios节能规则太严格,ubuntu无法忽视

最近查到这应该是新硬盘的自我保护方式,和系统无关
http://www.storagereview.com/guide2000/ ... sHead.html
上次由 qqttdh 在 2007-12-05 17:35,总共编辑 1 次。
回复