| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 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-alpha-disk.xml,v 1.27 2008/01/04 17:36:52 neysx Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-disk.xml,v 1.28 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>2008-01-04</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 SCSI HD in a Linux system, namely |
|
|
| 31 | <path>/dev/sda</path>. |
|
|
| 32 | </p> |
|
|
| 33 | |
|
|
| 34 | <p> |
|
|
| 35 | The block devices above represent an abstract interface to the disk. User |
|
|
| 36 | programs can use these block devices to interact with your disk without worrying |
|
|
| 37 | about whether your drives are IDE, SCSI or something else. The program can |
|
|
| 38 | simply address the storage on the disk as a bunch of contiguous, |
|
|
| 39 | randomly-accessible 512-byte blocks. |
|
|
| 40 | </p> |
|
|
| 41 | |
|
|
| 42 | </body> |
|
|
| 43 | </subsection> |
17 | <subsection> |
|
|
18 | <include href="hb-install-blockdevices.xml"/> |
|
|
19 | </subsection> |
|
|
20 | |
| 44 | <subsection> |
21 | <subsection> |
| 45 | <title>Slices</title> |
22 | <title>Slices</title> |
| 46 | <body> |
23 | <body> |
| 47 | |
24 | |
| 48 | <p> |
25 | <p> |
| 49 | Although it is theoretically possible to use a full disk to house your Linux |
26 | Although it is theoretically possible to use a full disk to house your Linux |
| 50 | system, this is almost never done in practice. Instead, full disk block devices |
27 | system, this is almost never done in practice. Instead, full disk block devices |
| 51 | are split up in smaller, more manageable block devices. On Alpha systems, |
28 | are split up in smaller, more manageable block devices. On Alpha systems, |
| 52 | these are called <e>slices</e>. |
29 | these are called <e>slices</e>. |
| 53 | </p> |
30 | </p> |
| 54 | |
31 | |
| 55 | </body> |
32 | </body> |
| 56 | </subsection> |
33 | </subsection> |
| 57 | </section> |
34 | </section> |
| 58 | <section> |
35 | <section> |
| … | |
… | |
| 624 | <title>Creating Filesystems</title> |
601 | <title>Creating Filesystems</title> |
| 625 | <subsection> |
602 | <subsection> |
| 626 | <title>Introduction</title> |
603 | <title>Introduction</title> |
| 627 | <body> |
604 | <body> |
| 628 | |
605 | |
| 629 | <p> |
606 | <p> |
| 630 | Now that your partitions are created, it is time to place a filesystem on them. |
607 | Now that your partitions are created, it is time to place a filesystem on them. |
| 631 | If you don't care about what filesystem to choose and are happy with what we use |
608 | If you don't care about what filesystem to choose and are happy with what we use |
| 632 | as default in this handbook, continue with <uri |
609 | as default in this handbook, continue with <uri |
| 633 | link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. |
610 | link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. |
| 634 | Otherwise read on to learn about the available filesystems... |
611 | Otherwise read on to learn about the available filesystems... |
| 635 | </p> |
612 | </p> |
| 636 | |
613 | |
| 637 | </body> |
614 | </body> |
| 638 | </subsection> |
615 | </subsection> |
| 639 | <subsection> |
|
|
| 640 | <title>Filesystems?</title> |
|
|
| 641 | <body> |
|
|
| 642 | |
616 | |
| 643 | <p> |
|
|
| 644 | Several filesystems are available. Most of them are found stable on the |
|
|
| 645 | Alpha architecture. |
|
|
| 646 | </p> |
|
|
| 647 | |
|
|
| 648 | <note> |
|
|
| 649 | <c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b> |
|
|
| 650 | partitions. |
|
|
| 651 | </note> |
|
|
| 652 | |
|
|
| 653 | <p> |
|
|
| 654 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
|
|
| 655 | journaling, which means that routine ext2 filesystem checks at startup time can |
|
|
| 656 | be quite time-consuming. There is now quite a selection of newer-generation |
|
|
| 657 | journaled filesystems that can be checked for consistency very quickly and are |
|
|
| 658 | thus generally preferred over their non-journaled counterparts. Journaled |
|
|
| 659 | filesystems prevent long delays when you boot your system and your filesystem |
|
|
| 660 | happens to be in an inconsistent state. |
|
|
| 661 | </p> |
|
|
| 662 | |
|
|
| 663 | <p> |
|
|
| 664 | <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
|
|
| 665 | journaling for fast recovery in addition to other enhanced journaling modes like |
|
|
| 666 | full data and ordered data journaling. It uses an HTree index that enables high |
|
|
| 667 | performance in almost all situations. In short, ext3 is a very good and reliable |
|
|
| 668 | filesystem. |
|
|
| 669 | </p> |
|
|
| 670 | |
|
|
| 671 | <p> |
|
|
| 672 | <b>ReiserFS</b> is a B+tree-based filesystem that has very good overall |
|
|
| 673 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
|
|
| 674 | files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
|
|
| 675 | extremely well and has metadata journaling. ReiserFS is solid and usable as |
|
|
| 676 | both general-purpose filesystem and for extreme cases such as the creation of |
|
|
| 677 | large filesystems, very large files and directories containing tens of |
|
|
| 678 | thousands of small files. |
|
|
| 679 | </p> |
|
|
| 680 | |
|
|
| 681 | <p> |
|
|
| 682 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
|
|
| 683 | feature-set and is optimized for scalability. We only recommend using this |
|
|
| 684 | filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
|
|
| 685 | an uninterruptible power supply. Because XFS aggressively caches in-transit data |
|
|
| 686 | in RAM, improperly designed programs (those that don't take proper precautions |
|
|
| 687 | when writing files to disk and there are quite a few of them) can lose a good |
|
|
| 688 | deal of data if the system goes down unexpectedly. |
|
|
| 689 | </p> |
|
|
| 690 | |
|
|
| 691 | <p> |
|
|
| 692 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
|
|
| 693 | become production-ready and there hasn't been a sufficient track record to |
|
|
| 694 | comment positively nor negatively on its general stability at this point. |
|
|
| 695 | </p> |
|
|
| 696 | |
|
|
| 697 | </body> |
|
|
| 698 | </subsection> |
617 | <subsection> |
|
|
618 | <include href="hb-install-filesystems.xml"/> |
|
|
619 | </subsection> |
|
|
620 | |
| 699 | <subsection id="filesystems-apply"> |
621 | <subsection id="filesystems-apply"> |
| 700 | <title>Applying a Filesystem to a Partition</title> |
622 | <title>Applying a Filesystem to a Partition</title> |
| 701 | <body> |
623 | <body> |
| 702 | |
624 | |
| 703 | <p> |
625 | <p> |
| 704 | To create a filesystem on a partition or volume, there are tools available for |
626 | To create a filesystem on a partition or volume, there are tools available for |
| 705 | each possible filesystem: |
627 | each possible filesystem: |
| 706 | </p> |
628 | </p> |
| 707 | |
629 | |
| 708 | <table> |
630 | <table> |
| 709 | <tr> |
631 | <tr> |
| 710 | <th>Filesystem</th> |
632 | <th>Filesystem</th> |
| 711 | <th>Creation Command</th> |
633 | <th>Creation Command</th> |
| 712 | </tr> |
634 | </tr> |
| 713 | <tr> |
635 | <tr> |