The Linux System Administrator’s Guide
Many people have helped me with this book, directly or indirectly. I would like to especially thank Matt Welsh for inspiration and LDP leadership, Andy Oram for getting me to work again with much−valued feedback, Olaf Kirch for showing me that it can be done, and Adam Richter at Yggdrasil and others for showing me that other people can find it interesting as well. Stephen Tweedie, H. Peter Anvin, Remy Card, Theodore Ts’o, and Stephen Tweedie have let me borrow their work (and thus make the book look thicker and much more impressive): a comparison between the xia and ext2 filesystems, the device list and a description of the ext2 filesystem. These aren’t part of the book any more. I am most grateful for this, and very apologetic for the earlier versions that sometimes lacked proper attribution.
In addition, I would like to thank Mark Komarinski for sending his material in 1993 and the many system administration columns in Linux Journal. They are quite informative and inspirational. Many useful comments have been sent by a large number of people. My miniature black hole of an archive doesn’t let me find all their names, but some of them are, in alphabetical order: Paul Caprioli, Ales Cepek, Marie−France Declerfayt, Dave Dobson, Olaf Flebbe, Helmut Geyer, Larry Greenfield and his father, Stephen Harris, Jyrki Havia, Jim Haynes, York Lam, Timothy Andrew Lister, Jim Lynch, Michael J. Micek, Jacob Navia, Dan Poirier, Daniel Quinlan, Jouni K Seppänen, Philippe Steindl, G.B. Stotte. My apologies to anyone I have forgotten.
I would like to thank Lars, Joanna, and Stephen for all the great work that they have done on this document over the years. I only hope that my contribution will be worthy of continuing the work they started. Like the previous maintainers, I openly welcome any comments, suggestions, complains, corrections, or any other form of feedback you may have. This document can only benefit from the suggestions of those who use it.There have been many people who have helped me on my journey through the « Windows−Free » world, the person I feel I need to thank the most is my first true UN*X mentor, Mike Velasco. Back in a time before SCO became a « dirty word », Mike helped me on the path of tar’s, cpio’s, and many, many man pages. Thanks Mike! You are the ‘Sofa King’.
The source code and other machine readable formats of this book can be found on the Internet via anonymous FTP at the Linux Documentation Project home page http://www.tldp.org/, or at the home page of this book at http://www.draxeman/sag.html. This book is available in at least it’s SGML source, as well as, HTML and PDF formats. Other formats may be available.
Hard disks
See Figure 5−1 for a schematic picture of the important parts in a hard disk. A hard disk consists of one or more circular aluminum platters\ , of which either or both surfaces are coated with a magnetic substance used for recording the data. For each surface, there is a read−write head that examines or alters the recorded data. The platters rotate on a common axis; typical rotation speed is 5400 or 7200 rotations per minute, although high−performance hard disks have higher speeds and older disks may have lower speeds. The heads move along the radius of the platters; this movement combined with the rotation of the platters allows the head to access all parts of the surfaces.
The processor (CPU) and the actual disk communicate through a disk controller . This relieves the rest of the computer from knowing how to use the drive, since the controllers for different types of disks can be made to use the same interface towards the rest of the computer. Therefore, the computer can say just « hey disk, give me what I want », instead of a long and complex series of electric signals to move the head to the proper location and waiting for the correct position to come under the head and doing all the other unpleasant stuff necessary. (In reality, the interface to the controller is still complex, but much less so than it would otherwise be.) The controller may also do other things, such as caching, or automatic bad sector replacement.