April 24, 2019

New HOWTO: Linux Partition HOWTO - page 2

Table of Contents

  • April 5, 2001
1. Introduction

1.1. What is a partition?

Partitioning is a means to divide a single hard drive into many logical
drives. A partition is a contiguous set of blocks on a drive that are treated
as an independant disk. A partition table (the creation of which is the topic
of this HOWTO) is an index that relates sections of the hard drive to

Why have multiple partitions?

  * Encapsulate your data. Since file system corruption is local to a
    partition, you stand to lose only some of your data if an accident
  * Increase disk space efficiency. You can format partitions with varying
    block sizes, depending on your usage. If your data is in a large number
    of small files (less than 1k) and your partition uses 4k sized blocks,
    you are wasting 3k for every file. In general, you waste on average one
    half of a block for every file, so matching block size to the average
    size of your files is important if you have many files.
  * Limit data growth. Runaway processes or maniacal users can consume so
    much disk space that the operating system no longer has room on the hard
    drive for its bookkeeping operations. This will lead to disaster. By
    segregating space, you ensure that things other than the operating system
    die when allocated disk space is exhausted.
1.2. Constraints

  * Partitions must not overlap. This will cause data corruption and other
    spooky stuff.
  * There ought to be be no gap between adjacent partitions. While this is
    not harmful, you are wasting precious disk space by leaving space between
  * A disk need not be partitioned completely. You may decide to leave some
    unpartitioned space at the end of your disk and partition it later.
  * Partitions cannot be moved but they can be resized and copied using
    special software. This HOWTO only covers the use of the fdisk utility,
    which does not permit any of these operations.

1.3. Other Partitioning Software:

  * sfdisk: a command-line version of fdisk
  * cfdisk: a curses-based version of fdisk
  * parted: Gnu partition editor
  * Partition Magic: a commercial utility to create, resize, merge and
    convert partitions, without destroying data.
  * Disk Drake: a Perl/Gtk program to create, rsize, and delete partitions
1.4. Related HOWTOs

Table 1. Related HOWTOs
|Title                           |Author                      |Description             |
|Linux Multiple Disk System      |[mailto:sgjoen@mail.nyx.net]|How to estimate the     |
|Tuning                          |Gjoen Stein                 |various size and speed  |
|                                |                            |requirements for        |
|                                |                            |different parts of the  |
|                                |                            |filesystem.             |
|Linux Large Disk                |[mailto:aeb@cwi.nl] Andries |Instructions and        |
|                                |Brouwer                     |considerations regarding|
|                                |                            |disks with more than    |
|                                |                            |1024 cylinders          |
|Linux Quota                     |[mailto:bertie@scn.org]     |Instructions on limiting|
|                                |Albert M.C. Tam             |disk space usage per    |
|                                |                            |user (quotas)           |
|[http://metalab.unc.edu/mdw/    |[mailto:jdanield@dodin.net] |How to restore linux    |
|HOWTO/mini/                     |Jean-Daniel Dodin           |partitions after they   |
|Partition-Rescue-mini-HOWTO.html|                            |have been deleted by a  |
|Partition-Rescue]               |                            |Windows install. Does   |
|Partition-Rescue mini-HOWTO     |                            |not appear to preserve  |
|                                |                            |data.                   |
|Linux ADSM Backup               |Thomas Koenig               |Instructions on         |
|                                |                            |integrating Linux into  |
|                                |                            |an IBM ADSM backup      |
|                                |                            |environment.            |
|Linux Backup with MSDOS         |Christopher Neufeld         |Information about MS-DOS|
|                                |                            |driven Linux backups.   |
|Linux HOWTO Index               |[mailto:                    |Instructions on writing |
|                                |linux-howto@sunsite.unc.edu]|and submitting a HOWTO  |
|                                |Tim Bynum                   |document                |

1.5. Additional information on your system:

  * /usr/src/linux/Documentation
      + ide.txt: Info about your IDE drivers
      + scsi.txt: Info about your SCSI drivers

Most Popular LinuxPlanet Stories