| … | |
… | |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc64-disk.xml,v 1.32 2007/06/26 17:12:56 nightmorph Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc64-disk.xml,v 1.33 2008/04/01 08:53:46 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>8.2</version> |
11 | <version>9.0</version> |
| 12 | <date>2007-06-26</date> |
12 | <date>2008-04-01</date> |
| 13 | |
13 | |
| 14 | <section> |
14 | <section> |
| 15 | <title>Introduction to Block Devices</title> |
15 | <title>Introduction to Block Devices</title> |
| 16 | <subsection> |
|
|
| 17 | <title>Block Devices</title> |
|
|
| 18 | <body> |
|
|
| 19 | |
16 | |
| 20 | <p> |
|
|
| 21 | We'll take a good look at disk-oriented aspects of Gentoo Linux |
|
|
| 22 | and Linux in general, including Linux filesystems, partitions and block devices. |
|
|
| 23 | Then, once you're familiar with the ins and outs of disks and filesystems, |
|
|
| 24 | you'll be guided through the process of setting up partitions and filesystems |
|
|
| 25 | for your Gentoo Linux installation. |
|
|
| 26 | </p> |
|
|
| 27 | |
|
|
| 28 | <p> |
|
|
| 29 | To begin, we'll introduce <e>block devices</e>. The most famous block device is |
|
|
| 30 | probably the one that represents the first IDE drive in a Linux system, namely |
|
|
| 31 | <path>/dev/hda</path>. If your system uses SCSI drives, then your first hard |
|
|
| 32 | drive would be <path>/dev/sda</path>. Serial ATA drives are also |
|
|
| 33 | <path>/dev/sda</path> even if they are IDE drives. |
|
|
| 34 | </p> |
|
|
| 35 | |
|
|
| 36 | <p> |
|
|
| 37 | The block devices above represent an abstract interface to the disk. User |
|
|
| 38 | programs can use these block devices to interact with your disk without worrying |
|
|
| 39 | about whether your drives are IDE, SCSI or something else. The program can |
|
|
| 40 | simply address the storage on the disk as a bunch of contiguous, |
|
|
| 41 | randomly-accessible 512-byte blocks. |
|
|
| 42 | </p> |
|
|
| 43 | |
|
|
| 44 | </body> |
|
|
| 45 | </subsection> |
17 | <subsection> |
|
|
18 | <include href="hb-install-blockdevices.xml"/> |
|
|
19 | </subsection> |
|
|
20 | |
| 46 | <subsection> |
21 | <subsection> |
| 47 | <title>Partitions and Slices</title> |
22 | <title>Partitions and Slices</title> |
| 48 | <body> |
23 | <body> |
| 49 | |
24 | |
| 50 | <p> |
25 | <p> |
| … | |
… | |
| 594 | Otherwise read on to learn about the available filesystems... |
569 | Otherwise read on to learn about the available filesystems... |
| 595 | </p> |
570 | </p> |
| 596 | |
571 | |
| 597 | </body> |
572 | </body> |
| 598 | </subsection> |
573 | </subsection> |
| 599 | <subsection> |
|
|
| 600 | <title>Filesystems?</title> |
|
|
| 601 | <body> |
|
|
| 602 | |
574 | |
| 603 | <note> |
|
|
| 604 | Several filesystems are available. ext2, ext3 and ReiserFS support is built in |
|
|
| 605 | the Installation CD kernels. JFS and XFS support is available through kernel |
|
|
| 606 | modules. |
|
|
| 607 | </note> |
|
|
| 608 | |
|
|
| 609 | <p> |
|
|
| 610 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
|
|
| 611 | journaling, which means that routine ext2 filesystem checks at startup time can |
|
|
| 612 | be quite time-consuming. There is now quite a selection of newer-generation |
|
|
| 613 | journaled filesystems that can be checked for consistency very quickly and are |
|
|
| 614 | thus generally preferred over their non-journaled counterparts. Journaled |
|
|
| 615 | filesystems prevent long delays when you boot your system and your filesystem |
|
|
| 616 | happens to be in an inconsistent state. |
|
|
| 617 | </p> |
|
|
| 618 | |
|
|
| 619 | <p> |
|
|
| 620 | <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
|
|
| 621 | journaling for fast recovery in addition to other enhanced journaling modes like |
|
|
| 622 | full data and ordered data journaling. It uses an HTree index that enables high |
|
|
| 623 | performance in almost all situations. In short, ext3 is a very good and reliable |
|
|
| 624 | filesystem. |
|
|
| 625 | </p> |
|
|
| 626 | |
|
|
| 627 | <p> |
|
|
| 628 | <b>ReiserFS</b> is a B+tree-based filesystem that has very good overall |
|
|
| 629 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
|
|
| 630 | files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
|
|
| 631 | extremely well and has metadata journaling. ReiserFS is solid and usable as |
|
|
| 632 | both general-purpose filesystem and for extreme cases such as the creation of |
|
|
| 633 | large filesystems, very large files and directories containing tens of |
|
|
| 634 | thousands of small files. |
|
|
| 635 | </p> |
|
|
| 636 | |
|
|
| 637 | <p> |
|
|
| 638 | <b>XFS</b> is a filesystem with metadata journaling that is fully supported |
|
|
| 639 | under Gentoo Linux's xfs-sources kernel. It comes with a robust feature-set and |
|
|
| 640 | is optimized for scalability. We only recommend using this filesystem on Linux |
|
|
| 641 | systems with high-end SCSI and/or fibre channel storage and a uninterruptible |
|
|
| 642 | power supply. Because XFS aggressively caches in-transit data in RAM, improperly |
|
|
| 643 | designed programs (those that don't take proper precautions when writing files |
|
|
| 644 | to disk and there are quite a few of them) can lose a good deal of data if the |
|
|
| 645 | system goes down unexpectedly. |
|
|
| 646 | </p> |
|
|
| 647 | |
|
|
| 648 | <p> |
|
|
| 649 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
|
|
| 650 | become production-ready. |
|
|
| 651 | </p> |
|
|
| 652 | |
|
|
| 653 | </body> |
|
|
| 654 | </subsection> |
575 | <subsection> |
|
|
576 | <include href="hb-install-filesystems.xml"/> |
|
|
577 | </subsection> |
|
|
578 | |
| 655 | <subsection id="filesystems-apply"> |
579 | <subsection id="filesystems-apply"> |
| 656 | <title>Applying a Filesystem to a Partition</title> |
580 | <title>Applying a Filesystem to a Partition</title> |
| 657 | <body> |
581 | <body> |
| 658 | |
582 | |
| 659 | <p> |
583 | <p> |