| … | |
… | |
| 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-x86+amd64-disk.xml,v 1.9 2007/06/26 07:07:27 nightmorph Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-disk.xml,v 1.10 2008/04/01 08:53:46 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <abstract> |
11 | <abstract> |
| 12 | To be able to install Gentoo, you must create the necessary partitions. |
12 | To be able to install Gentoo, you must create the necessary partitions. |
| 13 | This chapter describes how to partition a disk for future usage. |
13 | This chapter describes how to partition a disk for future usage. |
| 14 | </abstract> |
14 | </abstract> |
| 15 | |
15 | |
| 16 | <version>5.1</version> |
16 | <version>6.0</version> |
| 17 | <date>2007-06-26</date> |
17 | <date>2008-04-01</date> |
| 18 | |
18 | |
| 19 | <section> |
19 | <section> |
| 20 | <title>Introduction to Block Devices</title> |
20 | <title>Introduction to Block Devices</title> |
| 21 | <subsection> |
|
|
| 22 | <title>Block Devices</title> |
|
|
| 23 | <body> |
|
|
| 24 | |
21 | |
| 25 | <p> |
|
|
| 26 | We'll take a good look at disk-oriented aspects of Gentoo Linux |
|
|
| 27 | and Linux in general, including Linux filesystems, partitions and block devices. |
|
|
| 28 | Then, once you're familiar with the ins and outs of disks and filesystems, |
|
|
| 29 | you'll be guided through the process of setting up partitions and filesystems |
|
|
| 30 | for your Gentoo Linux installation. |
|
|
| 31 | </p> |
|
|
| 32 | |
|
|
| 33 | <p> |
|
|
| 34 | To begin, we'll introduce <e>block devices</e>. The most famous block device is |
|
|
| 35 | probably the one that represents the first IDE drive in a Linux system, namely |
|
|
| 36 | <path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your |
|
|
| 37 | first hard drive would be <path>/dev/sda</path>. |
|
|
| 38 | </p> |
|
|
| 39 | |
|
|
| 40 | <p> |
|
|
| 41 | The block devices above represent an abstract interface to the disk. User |
|
|
| 42 | programs can use these block devices to interact with your disk without worrying |
|
|
| 43 | about whether your drives are IDE, SCSI or something else. The program can |
|
|
| 44 | simply address the storage on the disk as a bunch of contiguous, |
|
|
| 45 | randomly-accessible 512-byte blocks. |
|
|
| 46 | </p> |
|
|
| 47 | |
|
|
| 48 | </body> |
|
|
| 49 | </subsection> |
22 | <subsection> |
|
|
23 | <include href="hb-install-blockdevices.xml"/> |
|
|
24 | </subsection> |
|
|
25 | |
| 50 | <subsection> |
26 | <subsection> |
| 51 | <title>Partitions</title> |
27 | <title>Partitions</title> |
| 52 | <body> |
28 | <body> |
| 53 | |
29 | |
| 54 | <p> |
30 | <p> |
| … | |
… | |
| 504 | Otherwise read on to learn about the available filesystems... |
480 | Otherwise read on to learn about the available filesystems... |
| 505 | </p> |
481 | </p> |
| 506 | |
482 | |
| 507 | </body> |
483 | </body> |
| 508 | </subsection> |
484 | </subsection> |
| 509 | <subsection> |
|
|
| 510 | <title>Filesystems?</title> |
|
|
| 511 | <body> |
|
|
| 512 | |
485 | |
| 513 | <p test="func:keyval('arch')='x86'"> |
|
|
| 514 | The Linux kernel supports various filesystems. We'll explain ext2, ext3, |
|
|
| 515 | ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux |
|
|
| 516 | systems. |
|
|
| 517 | </p> |
|
|
| 518 | |
|
|
| 519 | <p test="func:keyval('arch')='AMD64'"> |
|
|
| 520 | Several filesystems are available. Some of them are found stable on the amd64 |
|
|
| 521 | architecture, others aren't. The following filesystems are found to be stable: |
|
|
| 522 | ext2 and ext3. jfs and reiserfs may work but need more testing. If you're |
|
|
| 523 | really adventurous you can try the unsupported filesystems. |
|
|
| 524 | </p> |
|
|
| 525 | |
|
|
| 526 | <p> |
|
|
| 527 | <b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
|
|
| 528 | journaling, which means that routine ext2 filesystem checks at startup time can |
|
|
| 529 | be quite time-consuming. There is now quite a selection of newer-generation |
|
|
| 530 | journaled filesystems that can be checked for consistency very quickly and are |
|
|
| 531 | thus generally preferred over their non-journaled counterparts. Journaled |
|
|
| 532 | filesystems prevent long delays when you boot your system and your filesystem |
|
|
| 533 | happens to be in an inconsistent state. |
|
|
| 534 | </p> |
|
|
| 535 | |
|
|
| 536 | <p> |
|
|
| 537 | <b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
|
|
| 538 | journaling for fast recovery in addition to other enhanced journaling modes like |
|
|
| 539 | full data and ordered data journaling. It uses an HTree index that enables high |
|
|
| 540 | performance in almost all situations. In short, ext3 is a very good and reliable |
|
|
| 541 | filesystem. |
|
|
| 542 | </p> |
|
|
| 543 | |
|
|
| 544 | <p> |
|
|
| 545 | <b>ReiserFS</b> is a B+tree-based filesystem that has very good overall |
|
|
| 546 | performance and greatly outperforms both ext2 and ext3 when dealing with small |
|
|
| 547 | files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
|
|
| 548 | extremely well and has metadata journaling. ReiserFS is solid and usable as |
|
|
| 549 | both general-purpose filesystem and for extreme cases such as the creation of |
|
|
| 550 | large filesystems, very large files and directories containing tens of |
|
|
| 551 | thousands of small files. |
|
|
| 552 | </p> |
|
|
| 553 | |
|
|
| 554 | <p> |
|
|
| 555 | <b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
|
|
| 556 | feature-set and is optimized for scalability. We only recommend using this |
|
|
| 557 | filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
|
|
| 558 | an uninterruptible power supply. Because XFS aggressively caches in-transit data |
|
|
| 559 | in RAM, improperly designed programs (those that don't take proper precautions |
|
|
| 560 | when writing files to disk and there are quite a few of them) can lose a good |
|
|
| 561 | deal of data if the system goes down unexpectedly. |
|
|
| 562 | </p> |
|
|
| 563 | |
|
|
| 564 | <p> |
|
|
| 565 | <b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
|
|
| 566 | become production-ready and there hasn't been a sufficient track record to |
|
|
| 567 | comment positively nor negatively on its general stability at this point. |
|
|
| 568 | </p> |
|
|
| 569 | |
|
|
| 570 | </body> |
|
|
| 571 | </subsection> |
486 | <subsection> |
|
|
487 | <include href="hb-install-filesystems.xml"/> |
|
|
488 | </subsection> |
|
|
489 | |
| 572 | <subsection id="filesystems-apply"> |
490 | <subsection id="filesystems-apply"> |
| 573 | <title>Applying a Filesystem to a Partition</title> |
491 | <title>Applying a Filesystem to a Partition</title> |
| 574 | <body> |
492 | <body> |
| 575 | |
493 | |
| 576 | <p> |
494 | <p> |