[问题] 关于“完美解决Ubuntu Linux关机异响[SATA硬盘] ”
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- baoshaojing
- 帖子: 85
- 注册时间: 2007-05-30 9:23
[问题] 关于“完美解决Ubuntu Linux关机异响[SATA硬盘] ”
以下是别人写的,我按照他的方法了,可是没有成功,麻烦大家看看是不是有问题啊。
作者:Webmaster
在Linux中关机或者休眠, 进行到最后切断电源时硬盘发出啾的一声, 就像windows中突然断电时的硬盘声音
在fedora core和ubuntu里面都存在, 而windows下没问题, 所以基本上是linux系统本身的原因, 导致硬盘电源管理不正常
看起来这会严重地划伤硬盘, 硬盘还是比较精贵的东西, 少受罪为好.
参考了别人的方案, 问题解决:
1、新建文件 "/etc/rc0.d/S00hdd-shutdown-workaround" 内容为:
#!/bin/sh
echo 1 > /sys/class/scsi_disk/0\:0\:0\:0/stop_on_shutdown
注意: "/sys/class/scsi_disk"里面可能有几个类似 "0\:0\:0\:0"的目录, 查看你
的"/sys/class/scsi_disk/a\:b\:c\:d/device/model" 文件,
判断哪个是跟你的硬盘对应的(通常就是0\:0\:0\:0).
2、chmod +x S00hdd-shutdown-workaround
此时关机异响已经解决
3、把文件cp到 "/ect/init.d/hdd-shutdown-workaround"
4、建立连接
#ln -s /etc/init.d/hdd-shutdown-workaround /etc/rcS.d/S99hdd-shutdown-workaround
当然, 你需要首先su得到#权限
此时关机和休眠等等情况下硬盘电源切断正常, 不再有异响
5、完成
作者:Webmaster
在Linux中关机或者休眠, 进行到最后切断电源时硬盘发出啾的一声, 就像windows中突然断电时的硬盘声音
在fedora core和ubuntu里面都存在, 而windows下没问题, 所以基本上是linux系统本身的原因, 导致硬盘电源管理不正常
看起来这会严重地划伤硬盘, 硬盘还是比较精贵的东西, 少受罪为好.
参考了别人的方案, 问题解决:
1、新建文件 "/etc/rc0.d/S00hdd-shutdown-workaround" 内容为:
#!/bin/sh
echo 1 > /sys/class/scsi_disk/0\:0\:0\:0/stop_on_shutdown
注意: "/sys/class/scsi_disk"里面可能有几个类似 "0\:0\:0\:0"的目录, 查看你
的"/sys/class/scsi_disk/a\:b\:c\:d/device/model" 文件,
判断哪个是跟你的硬盘对应的(通常就是0\:0\:0\:0).
2、chmod +x S00hdd-shutdown-workaround
此时关机异响已经解决
3、把文件cp到 "/ect/init.d/hdd-shutdown-workaround"
4、建立连接
#ln -s /etc/init.d/hdd-shutdown-workaround /etc/rcS.d/S99hdd-shutdown-workaround
当然, 你需要首先su得到#权限
此时关机和休眠等等情况下硬盘电源切断正常, 不再有异响
5、完成
- baoshaojing
- 帖子: 85
- 注册时间: 2007-05-30 9:23
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星
When the platters are not spinning, the heads rest on the surface of the disk. When the platters spin
up, the heads rub along the surface of the platters until sufficient speed is gained for them to "lift off"
and float on their cushion of air. When the drive is spun down, the process is repeated in reverse. In
each case, for a period of time the heads make contact with the surface of the disk--while in motion,
in fact.
While the platters and heads are designed with the knowledge in mind that this contact will occur, it
still makes sense to avoid having this happen over an area of disk where there is data! For this reason,
most disks set aside a special track that is designated to be where the heads will be placed for takeoffs
and landings. Appropriately, this area is called the landing zone, and no data is placed there. The process
of moving the heads to this designated area is called head parking.
Most early hard drives that used stepper motors did not automatically park the heads of the drive. As a
safety precaution, small utilities were written that the user would run before shutting down the PC. The
utility would instruct the disk to move the heads to the landing zone, and then the PC could be shut off
safely. A parameter in the BIOS setup for the hard disk told the system which track was the landing
zone for the particular model of hard disk. Usually, it was the next consecutive-numbered track above
the largest-numbered one actually used for data.
Modern voice-coil actuated hard disk drives are all auto-parking. On some disks, a weak spring is
attached to the head assembly that tries to pull the heads to the landing zone. When power is applied
the actuator is able to overpower the spring and position the heads normally. When the power is shut
off, the electromagnetic force from the voice coil abates, and the spring yanks the heads to the landing
zone before the platters can spin down; this can sometimes be heard on older drives as an audible clunk
when you turn the power off. Other disks use a different mechanical or electronic scheme to achieve
the same goal. Some even make use of the rotational energy remaining in the spindle motor to move
the heads off the data surface when the power is cut off! This means that modern hard disks will
automatically park their heads--even in the event of a power failure--and no utilities are required. The
BIOS landing zone parameter for modern drives is ignored.
Some people still think that it is necessary to manually park the heads of modern hard disks, but this
is not true. I sometimes think of head parking utilities as the disk drive's equivalent of a screen saver.
In both cases, the software was invented as a preventative measure, and one that made sense for use
with the technology that prevailed at the time it was thought up. And in both cases, the technology has
evolved to the point where utility is no longer necessary, yet many people still think it is.
IBM has developed an alternative to conventional head parking that I think is really a great idea. Instead
of letting the heads fall down to the surface of the disk when the disk's motor is stopped, the heads are
lifted completely off the surface of the disk while the drive is still spinning, using a special ramp. Only
then are the disks allowed to spin down. When the power is reapplied to the spindle motor, the process is
reversed: the disks spin up, and once they are going fast enough to let the heads fly without contacting
the disk surface, the heads are moved off the "ramp" and back onto the surface of the platters. IBM calls
this load/unload technology. In theory it should improve the reliability of the hard disk as a whole, by
eliminating most contact between the heads and platters entirely. I am unaware of any other drive
manufacturers using it at this time. You can read more about it here.
Another feature related to reducing damage to the hard disks caused by wear from the heads is wear
leveling, which moves the heads over the surface of the drive to avoid "wearing out" one section of the
drive. It is discussed in this quality and reliability section.
up, the heads rub along the surface of the platters until sufficient speed is gained for them to "lift off"
and float on their cushion of air. When the drive is spun down, the process is repeated in reverse. In
each case, for a period of time the heads make contact with the surface of the disk--while in motion,
in fact.
While the platters and heads are designed with the knowledge in mind that this contact will occur, it
still makes sense to avoid having this happen over an area of disk where there is data! For this reason,
most disks set aside a special track that is designated to be where the heads will be placed for takeoffs
and landings. Appropriately, this area is called the landing zone, and no data is placed there. The process
of moving the heads to this designated area is called head parking.
Most early hard drives that used stepper motors did not automatically park the heads of the drive. As a
safety precaution, small utilities were written that the user would run before shutting down the PC. The
utility would instruct the disk to move the heads to the landing zone, and then the PC could be shut off
safely. A parameter in the BIOS setup for the hard disk told the system which track was the landing
zone for the particular model of hard disk. Usually, it was the next consecutive-numbered track above
the largest-numbered one actually used for data.
Modern voice-coil actuated hard disk drives are all auto-parking. On some disks, a weak spring is
attached to the head assembly that tries to pull the heads to the landing zone. When power is applied
the actuator is able to overpower the spring and position the heads normally. When the power is shut
off, the electromagnetic force from the voice coil abates, and the spring yanks the heads to the landing
zone before the platters can spin down; this can sometimes be heard on older drives as an audible clunk
when you turn the power off. Other disks use a different mechanical or electronic scheme to achieve
the same goal. Some even make use of the rotational energy remaining in the spindle motor to move
the heads off the data surface when the power is cut off! This means that modern hard disks will
automatically park their heads--even in the event of a power failure--and no utilities are required. The
BIOS landing zone parameter for modern drives is ignored.
Some people still think that it is necessary to manually park the heads of modern hard disks, but this
is not true. I sometimes think of head parking utilities as the disk drive's equivalent of a screen saver.
In both cases, the software was invented as a preventative measure, and one that made sense for use
with the technology that prevailed at the time it was thought up. And in both cases, the technology has
evolved to the point where utility is no longer necessary, yet many people still think it is.
IBM has developed an alternative to conventional head parking that I think is really a great idea. Instead
of letting the heads fall down to the surface of the disk when the disk's motor is stopped, the heads are
lifted completely off the surface of the disk while the drive is still spinning, using a special ramp. Only
then are the disks allowed to spin down. When the power is reapplied to the spindle motor, the process is
reversed: the disks spin up, and once they are going fast enough to let the heads fly without contacting
the disk surface, the heads are moved off the "ramp" and back onto the surface of the platters. IBM calls
this load/unload technology. In theory it should improve the reliability of the hard disk as a whole, by
eliminating most contact between the heads and platters entirely. I am unaware of any other drive
manufacturers using it at this time. You can read more about it here.
Another feature related to reducing damage to the hard disks caused by wear from the heads is wear
leveling, which moves the heads over the surface of the drive to avoid "wearing out" one section of the
drive. It is discussed in this quality and reliability section.
目前负债150多万
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星
- baoshaojing
- 帖子: 85
- 注册时间: 2007-05-30 9:23
- windwiny
- 帖子: 2254
- 注册时间: 2007-03-13 17:26
- shugoal
- 帖子: 1109
- 注册时间: 2007-08-20 21:39
- 来自: 沈阳
- 联系:
- baoshaojing
- 帖子: 85
- 注册时间: 2007-05-30 9:23
- JangMunho
- 帖子: 1347
- 注册时间: 2006-01-18 12:55
- 来自: 也许真的没有人理解
- JangMunho
- 帖子: 1347
- 注册时间: 2006-01-18 12:55
- 来自: 也许真的没有人理解
原Bug描述及解决方案(看回帖):https://bugs.launchpad.net/ubuntu/+sour ... +bug/67810
网上流传的这个方案是从这些回帖中摘出来的,回帖中就错把etc写成了ect,中文帖子原封不动就照搬了过来。
网上流传的这个方案是从这些回帖中摘出来的,回帖中就错把etc写成了ect,中文帖子原封不动就照搬了过来。
MacBook Pro 15" User
Cocoa Programmer
Cocoa Programmer
- baoshaojing
- 帖子: 85
- 注册时间: 2007-05-30 9:23
呵呵,谢谢阿JangMunho 写了:原Bug描述及解决方案(看回帖):https://bugs.launchpad.net/ubuntu/+sour ... +bug/67810
网上流传的这个方案是从这些回帖中摘出来的,回帖中就错把etc写成了ect,中文帖子原封不动就照搬了过来。
我看看了看那个英文版的bug,看不太懂。可能是因为自己不是学计算机的原因吧,总之这个问题没有解决。不过既然是内核问题,那么把内核升级一下,到Kernel 2.6.22-11
应该就没有问题了吧,我先升级一下内核。
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星