Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 368 #394
i
i
i
i
i
i
i
i
17.4 Rest for the Hard Disk
In Linux, a hard disk that is not used can be put to sleep. The hdparm util-
ity modifies various hard disk settings. The option -y instantly switches
the hard disk to the standby mode. -Y (caution) puts it to sleep. hdparm -S
<x> causes the hard disk to be spun down after a certain period of inactiv-
ity. The placeholder hxi can be used as follows: 0 disables this mechanism,
causing the hard disk to run continuously. Values from 1 to 240 are multi-
plied by five seconds. Values from 241 to 251 correspond to one to eleven
times thirty minutes.
Often, it is not so easy to put the hard disk to sleep. In Linux, numerous
processes write to the hard disk, waking it up repeatedly. Therefore, it is
important to understand how Linux handles data that needs to be written
to the hard disk. First, all data is buffered in the RAM. This buffer is moni-
tored by the kernel update daemon (kupdated). When the data reaches a
certain age limit or when the buffer is filled to a certain degree, the buffer
content is flushed to the hard disk. The buffer size is dynamic and depends
on the size of the memory and the system load. By default, kupdated is set
to short intervals to achieve maximum data integrity. It checks the buffer
every five seconds and notifies the bdflush daemon when data is older
than thirty seconds or the buffer reaches a fill level of thirty percent. The
bdflush daemon then writes the data to the hard disk. It also writes inde-
pendently from kupdated if, for instance, the buffer is full. On a stable
system, these settings can be modified. However, do not forget that this
may have a detrimental effect on the data integrity.
Caution
Impairment of the Data Integrity
Changes to the kernel update daemon settings affect the data
integrity. Do not touch these settings if you are not sure.
Caution
Specify the settings for the hard disk time-out, the kupdated interval,
the buffer threshold, and the age limit for data in /etc/sysconfig/
powermanagement for battery operation and for AC operation. The
variables are described in Section 17.2.1 on page 361 and in the file it-
self. Further information is available in /usr/share/doc/packages/
powersave.
368 17.4. Rest for the Hard Disk