/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ia64-disk.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-ia64-disk.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.7
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-ia64-disk.xml,v 1.1 2006/09/03 05:02:44 vapier Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ia64-disk.xml,v 1.7 2008/04/01 08:53:46 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.2</version> 11<version>4.0</version>
12<date>2005-06-10</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>
21We'll take a good look at disk-oriented aspects of Gentoo Linux
22and Linux in general, including Linux filesystems, partitions and block devices.
23Then, once you're familiar with the ins and outs of disks and filesystems,
24you'll be guided through the process of setting up partitions and filesystems
25for your Gentoo Linux installation.
26</p>
27
28<p>
29To begin, we'll introduce <e>block devices</e>. The most famous block device is
30probably the one that represents the first IDE drive in a Linux system, namely
31<path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your
32first hard drive would be <path>/dev/sda</path>.
33</p>
34
35<p>
36The block devices above represent an abstract interface to the disk. User
37programs can use these block devices to interact with your disk without worrying
38about whether your drives are IDE, SCSI or something else. The program can
39simply address the storage on the disk as a bunch of contiguous,
40randomly-accessible 512-byte blocks.
41</p>
42
43</body>
44</subsection> 17<subsection>
18<include href="hb-install-blockdevices.xml"/>
19</subsection>
20
45<subsection> 21<subsection>
46<title>Partitions</title> 22<title>Partitions</title>
47<body> 23<body>
48 24
49<p> 25<p>
180</p> 156</p>
181 157
182<pre caption="Filesystem usage example"> 158<pre caption="Filesystem usage example">
183$ <i>df -h</i> 159$ <i>df -h</i>
184Filesystem Type Size Used Avail Use% Mounted on 160Filesystem Type Size Used Avail Use% Mounted on
185/dev/hda5 ext3 509M 132M 351M 28% / 161/dev/sda5 ext3 509M 132M 351M 28% /
186/dev/hda2 ext3 5.0G 3.0G 1.8G 63% /home 162/dev/sda2 ext3 5.0G 3.0G 1.8G 63% /home
187/dev/hda7 ext3 7.9G 6.2G 1.3G 83% /usr 163/dev/sda7 ext3 7.9G 6.2G 1.3G 83% /usr
188/dev/hda8 ext3 1011M 483M 477M 51% /opt 164/dev/sda8 ext3 1011M 483M 477M 51% /opt
189/dev/hda9 ext3 2.0G 607M 1.3G 32% /var 165/dev/sda9 ext3 2.0G 607M 1.3G 32% /var
190/dev/hda1 ext2 51M 17M 31M 36% /boot 166/dev/sda1 ext2 51M 17M 31M 36% /boot
191/dev/hda6 swap 516M 12M 504M 2% &lt;not mounted&gt; 167/dev/sda6 swap 516M 12M 504M 2% &lt;not mounted&gt;
192<comment>(Unpartitioned space for future usage: 2 GB)</comment> 168<comment>(Unpartitioned space for future usage: 2 GB)</comment>
193</pre> 169</pre>
194 170
195<p> 171<p>
196<path>/usr</path> is rather full (83% used) here, but once 172<path>/usr</path> is rather full (83% used) here, but once
444Otherwise read on to learn about the available filesystems... 420Otherwise read on to learn about the available filesystems...
445</p> 421</p>
446 422
447</body> 423</body>
448</subsection> 424</subsection>
449<subsection>
450<title>Filesystems?</title>
451<body>
452 425
453<p>
454The Linux kernel supports various filesystems. We'll explain ext2, ext3,
455ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux
456systems.
457</p>
458
459<p>
460<b>vfat</b> is the MS-DOS filesystem, updated to allow long filenames. It is
461also the only filesystem type that the EFI firmware on ia64 systems understand.
462The boot partition on ia64 systems should always be vfat, but for your data
463partitions you should use one of the other filesystems listed below.
464</p>
465
466<p>
467<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
468journaling, which means that routine ext2 filesystem checks at startup time can
469be quite time-consuming. There is now quite a selection of newer-generation
470journaled filesystems that can be checked for consistency very quickly and are
471thus generally preferred over their non-journaled counterparts. Journaled
472filesystems prevent long delays when you boot your system and your filesystem
473happens to be in an inconsistent state.
474</p>
475
476<p>
477<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
478journaling for fast recovery in addition to other enhanced journaling modes like
479full data and ordered data journaling. ext3 is a very good and reliable
480filesystem.
481</p>
482
483<p>
484<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
485performance and greatly outperforms both ext2 and ext3 when dealing with small
486files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
487extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
488solid and usable as both general-purpose filesystem and for extreme cases such
489as the creation of large filesystems, the use of many small files, very large
490files and directories containing tens of thousands of files.
491</p>
492
493<p>
494<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
495feature-set and is optimized for scalability. We only recommend using this
496filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
497an uninterruptible power supply. Because XFS aggressively caches in-transit data
498in RAM, improperly designed programs (those that don't take proper precautions
499when writing files to disk and there are quite a few of them) can lose a good
500deal of data if the system goes down unexpectedly.
501</p>
502
503<p>
504<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
505become production-ready and there hasn't been a sufficient track record to
506comment positively nor negatively on its general stability at this point.
507</p>
508
509</body>
510</subsection> 426<subsection>
427<include href="hb-install-filesystems.xml"/>
428</subsection>
429
511<subsection id="filesystems-apply"> 430<subsection id="filesystems-apply">
512<title>Applying a Filesystem to a Partition</title> 431<title>Applying a Filesystem to a Partition</title>
513<body> 432<body>
514 433
515<p> 434<p>
554as ext3, you would run the following commands: 473as ext3, you would run the following commands:
555</p> 474</p>
556 475
557<pre caption="Applying a filesystem on a partition"> 476<pre caption="Applying a filesystem on a partition">
558# <i>mkdosfs /dev/sda1</i> 477# <i>mkdosfs /dev/sda1</i>
559mkdosfs 2.10 (22 Sep 2003)
560
561# <i>mke2fs -j /dev/sda3</i> 478# <i>mke2fs -j /dev/sda3</i>
562mke2fs 1.36 (05-Feb-2005)
563Filesystem label=
564OS type: Linux
565Block size=4096 (log=2)
566Fragment size=4096 (log=2)
5674382336 inodes, 8752348 blocks
568437617 blocks (5.00%) reserved for the super user
569First data block=0
570268 block groups
57132768 blocks per group, 32768 fragments per group
57216352 inodes per group
573Superblock backups stored on blocks:
574 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
575 4096000, 7962624
576
577Writing inode tables: done
578Creating journal (8192 blocks): done
579Writing superblocks and filesystem accounting information: done
580
581This filesystem will be automatically checked every 26 mounts or
582180 days, whichever comes first. Use tune2fs -c or -i to override.
583</pre> 479</pre>
584 480
585</body> 481</body>
586</subsection> 482</subsection>
587<subsection> 483<subsection>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20