Disk partitioning

  • As the virtualization technology, see Server Partitioning,
  • With databases, see denormalization # partition.

Under a partition (Latin partitions = " ( A ) distribution " ) refers to a contiguous portion of the memory space of a suitable physical or logical volume. A partition is itself a logical volume, but there are still other types of logical or virtual disks.

Partitions are largely independent of one another and can be treated by operating systems such as separate drives. Thus one calls a partition often as a logical drive. The access to the stored data is up to the operating system that manages the data in most cases, a file system: Most operating systems assign each logical drive exactly one file system; most file systems expect them to manage an entire partition alone.

  • 5.1 integration
  • 5.2 Under DOS / Windows
  • 5.3 In Linux
  • 5.4 Example for Shared Access

Use

Most operating systems can be operated with only one partition. This is the simplest type of partitioning, in which extends the partition across the entire disk.

However, there are various reasons for using multiple partitions:

  • Multiple operating systems: partitions allow you to install multiple operating systems on one hard disk.
  • Multiple file systems: Each partition has its own file system, thus can be applied on a physical disk by partitioning different file systems. This also increases the
  • Data Security: If the file system of a partition has errors, the other partitions are not affected. This is particularly advantageous when reinstalling the operating system, because only the partition can be formatted and retained data on other partitions.
  • Organization: You can store its data in different partitions according to the purpose. Thus, for example, the data of the system, application programs and user data are stored in different partitions, which facilitates, for example, backups.
  • System security: Among many Unix systems, it is possible to prohibit executable files on each partition.

On some types of disks, the total physical memory is used by most operating system used as a physical drive, without resorting to the concept of partitioning. From the operating system point of view of physical disks then corresponds to the contents of a logical partition, the file system used thus extends over the entire physical memory. This waiver of a partitioning is to be found, for example, on 3.5 " floppy disks.

Concepts of partitioning

Before there were hard drives larger capacity was limiting the space in physical units as it were natural - there was no further division into sub-units. Had such a magnetic tape in a tape drive, a certain storage capacity, and larger amounts of data needed to be distributed to a plurality of magnetic tapes. As a table of contents, for example VTOC was used.

In the course of time however, the capacity of storage devices has been increased. In 1983, hard disks were used with the IBM PC XT for the first time. Since hard drives have a much larger storage capacity than floppy disks, the possibility was created to divide it into partitions. The partition table thus represents one of the first concepts of the non-physical division into partitions

After IBM and Microsoft in 1983 the Master Boot Record (MBR ) were introduced with PC DOS or MS - ​​DOS 2.0, Apple followed in 1987 with the Apple Partition Map (APM ) for Macintosh computers. Other operating systems and platforms introduced the concept in the same way as BSD systems with disklabel ( 1988) or Commodore with Rigid Disk Block (RDB ) for Amiga computers. Also developed by Intel GUID partition table (GPT, " GUID Partition Table ") that (EFI) is introduced around 2000 and developed with UEFI since 2005 as part of this open specification from multiple manufacturers with the Extensible Firmware Interface corresponds to this concept.

About storage media and partition boundaries Logical Volume offer Manager (LVM ) is also possible to divide the available memory. With this concept, in addition, the natural boundaries are irrelevant, since, for example, multiple disks can be combined into a large storage area, which can then be further divided into individual partitions. Furthermore, the concept also offers the possibility of the memory by adding more storage media dynamically to increase ( or decrease by removing media) - Microsoft Windows (since Windows 2000), this partitioning concept therefore also " Dynamic Disk".

Another similar concept is the division of the memory by the file system. Some advanced file systems offer both the opportunity over storage medium boundaries ( such as LVM ) to manage a large composite storage as a file system, as well as this entire storage area in the form of partitions (English " subvolumes " ) or to manage separately as " snapshots ". Examples include, among others ZFS and btrfs.

For the latter concepts to a multi-level model is established by more than a partitioning concept is used. For example, all LVM implementations the opportunity (ie the concept of partition tables ) support on underlying partitions. A combination with other storage concepts such as redundancy (RAID ) is also possible with LVM and modern file systems. The plane in which, for example, the RAID array is implemented can vary up: so both the individual disk or individual partitions can be mapped as RAID as well as the configured as LVM volume group itself, although it would also be possible, the entire memory area to capture a data store without partition table within a specific LVM configuration and only to provide via LVM for a division into memory areas, this variant is not used in practice usually.

Compatibility and interoperability

Most computer architectures support only a specific partition table to boot operating systems. This is due to the fact that almost all computers as a platform, so as a computer, including operating systems, developed and sold. As a technical reason, it is partly because, as the firmware of a computer starts the boot loader. The unit is called bootstrapping process begins with loading the first program that runs a computer after power: the firmware, such as the BIOS on IBM PC, its successor UEFI, Open Firmware or kickstart. This first firmware initializes at least to start the required existing hardware (which may still be reading more from this firmware hardware and running ), and then passes to a boot loader that starts a particular operating system subsequently. To start the boot loader, it may be necessary to first read and evaluate the partition table. Therefore, the firmware needs to know the format of the partition table. Since it would be too much effort to implement multiple partition tables in the firmware, most only a single partition table can evaluate and consequently only start from a storage medium containing the partition table, the required boot loader.

A widely used and well-known exception is the BIOS for IBM PC compatible computers, as it was introduced in 1981 by IBM in the 5150 model. The BIOS reads a boot loader on the first sector of a medium, it is based on a fixed sector size of 512 bytes - Knows therefore in principle no partitions or partition tables. The 1983 introduced the Master Boot Record (MBR ) takes this concept into account by not only contains a partition table, but also a program (referred to as English master boot code), which has the task to read this partition table and from one of the listed partitions also to start in Bootstapping principle another boot loader. The IBM PC and compatible computers can therefore in principle contain any partition table, as long as initialized in the first sector on the storage medium, a boot loader that partition table and starts another boot loader for the operating system on one of the partitions. In practice, however, very little use, this possibility made ​​, but it allows, among other things, a boot loader on BIOS-based PCs that initializes a GUID partition table and can start from one of the partitions an operating system, assuming the launched operating system then also comes with this configuration cope. With Linux as that is the case, Windows other hand, reports an unsupported system configuration.

Other systems such as the Power Macintosh series of Apple use a fixed predefined partition table, as the Open Firmware as first firmware loads the boot loader directly to a file of one of the partitions. However, the firmware has to go one step further, as they must not only know for this purpose the partition table, but the file system: Apple systems from the PowerPC era (1994-2006), therefore, must be the boot loader on an APM partition be stored with Hierarchical File System. Also servers Sun Microsystems and IBM companies use Open Firmware, but use other file systems.

The since 2000, Intel specified in EFI GUID partition table ( GPT) sees itself as a successor to the Master Boot Record ( MBR) and therefore has implemented a number of Kompatibiltäts and protection functions. So there is always the first sector of a MBR, which has the task to protect the following GUID partition table and the space that it manages against access of older programs. This MBR so it is called " protective MBR " ( "Protective MBR " ) - old programs and computer systems do not come by the embarrassment of having the storage medium as a supposedly empty and uninitialized to recognize since the Protective MBR, a valid partition table including partition is available. In effect, therefore any storage medium with GPT is protected from deletion by mistake, on old systems that know only the MBR. Unlike the BIOS to bootstrap its successor UEFI loads the boot loader from a special partition must be formatted in the FAT32 file system. UEFI must therefore read the GUID partition table, and also have access to the FAT32 file system in order to then start the boot loader directly.

On Acorn computers each SCSI expansion card uses a proprietary implemented in the firmware partition table. This principle therefore leaves it to the used combination of controller card and storage device ( usually a disk partition) to use own implementations. The disadvantage, however, is that a hard drive that was used on a specific controller no longer works with another SCSI controller card.

The partition table on Amiga computers from Commodore uses a partition table that must be available within the first 16 sectors at the beginning of a sector. The advantage of this approach is that so several different partition tables are possible - for example, an MBR at sector 0 and a Rigid Disk Block in one of the following sectors.

Is all computer architectures have in common that an already -initiated operating system can use a variety of the partition tables on other storage media, because partition tables can be initialized by the operating system in software. A good example of this is Linux, which supports partition tables of different systems and platforms. But also, for example Windows can use partitions of both MBR and GPT partitioned media. Also, OS X can use next GPT and APM and MBR partitions. Note, however, that the file system used on a partition must also be supported by the operating system.

The most common and therefore compatible with almost all operating systems combination of partition table and file system provides an MBR partition - whether primary or logical partition - with the FAT32 file system dar. On older operating systems ( mid-1980s to the late 1990s ) works at least still the FAT16 file system, which allows only limited with just under 4 GiB partitions. However, the combination Master Boot Record with FAT32 partition not for data storage that is larger than 2 TiB ( = 2048 GiB, ≈ 2199 GB) are appropriate - since about 2010, there are disks with a storage capacity of 3 TiB and more. Therefore, increasingly uses the GUID partition table as the new standard on nearly all major operating systems, which appeared by 2010, by. Because of its widespread use modern operating systems also often deal with the model developed by Microsoft for its Windows operating systems NTFS file system, possibly using an additional driver of a third-party for write access. Alternatively, Microsoft offers the proprietary exFAT file system a successor who shall raise up some of the limitations of FAT32, but is not (yet) well supported equally by each operating system.

Names and types of different partitions

Primary and extended partitions

This distinction is only available on the master boot record partition table, how they can be applied, eg with fdisk. It can store a maximum of four partitions are entered, either up to four primary partitions or up to three primary partitions and one extended partition.

The definition of whether a partition is a primary or an extended partition takes place, using a partitioning program in the partition table that is part of the Master Boot Record.

An extended partition serves as a frame for any number of additional partitions. These are called logical partitions and are within the memory area of ​​the extended partition. So there can be only one extended partition ( which is defined as one of the four possible partitions in the MBR ), but this can contain an unlimited number of additional logical partitions. Logical partitions are thus not defined in the primary partition table, as both the table entry of the logical partition is in the storage area of the extended partition, and the memory area of ​​the logical partition itself

Logical Drive

As a logical drive is called a partition or multiple partitions combined, which is handled by the operating system as a physical drive / be.

Virtual Drive

Many operating systems can also logical drives that physically do not exist as part of a storage medium provide. This is made possible by an abstraction that allows the operating system to incorporate also from virtual sources logical drives. This can be, among others:

  • A RAM disk that incorporates a portion of the main memory as a logical drive in the system. However, the storage area must be formatted before use, so that a file system is available. Then unsaved data will be lost on every reboot and power off if not the method of implementation as part of the shutdown of the operating system creates a backup that is restored when re- initialize the RAM disk.
  • A virtual drive that as a file is in most cases on an already mounted filesystem and will be integrated virtualized as a physical storage medium in the system. Under Linux can be accomplished with standard tools this with a loop device. The DMG files in OS X work like virtual drives. Another example represents the integration of ISO images

Access and use

Integration

If a partition is made ​​available as a logical drive in the operating system, then one speaks of the drive that " integrated " is (English " mounted" or neudeutsch "mounted" ). However, there are different strategies to make the contents of the file systems of logical drives available:

  • As drive letters introduced in the 1970s, a letter from the Latin alphabet has been assigned since CP / M each logical drive. This means that exactly 26 logical drives from A: to Z: , possible. This strategy was also used in DOS and Windows.
  • As a directory: the file system of the partition is hooked into another already mounted file system at a specific location as a ( sub) directory so that all read and write operations refer in this and sub-directories on locally partition mounted.
  • As a swap partition: the operating system uses the entire partition exclusively to offload storage areas.

Under DOS / Windows

Under DOS and Windows to version 4.0 logical drives are basically mapped to drive letters. With MS- DOS and Windows 9x can also be set up and accessed per disk only one primary DOS partition. If there is no floppy drive available up to 24 logical drives are available as these drive letters A: and B: are reserved for floppy disk drives and thus are available for no other logical drive.

In NT-based Windows versions ( since version 5.0) can be omitted when using the NTFS file system on drive letter because the hooking is supported in a directory on another partition. In addition, A: and B: no longer limited to floppy drives. While several primary partitions are supported on internal disks still leaves the device driver to external media is only one partition.

Under Linux

On Linux and some like operating systems file systems are mounted in the directory tree. This corresponds to each logical drive of a combination of letters that says something about the type of disc. For example, say the first partition on a SATA hard drive / dev/sda1. The following partitions are numbered accordingly. If the partition table is a master boot record, so did the first logical partition ( within an extended partition ) on that disk getting the device name / dev/sda5 - even if there are fewer than four primary partitions.

By assigning a fixed block device minor numbers the maximum number of addressable logical drive is limited by device files for Linux kernel version 2.6.20 before. Thus is the highest number / dev/hdX63 For IDE / ATA disks and SCSI and SATA / dev/sdX15 ( each X is a, b ​​, c, ... for the first, second, third, ... data storage ). With kernel 2.6.20 (February 2007) the SCSI limit has been set of 15 partitions for all disks. This could, for example, ( c ) Although fdisk with a larger number of logical drives in MBR partition tables get around an unchanged kernel but do not use. Starting from kernel 2.6.28 (January 2009 ) dynamic block device numbers are used, which are assigned using the userspace program udev each device files, so this limit does not exist anymore.

Example for Shared Access

In the following example, partitioning based on the Master Boot Record multiple partitions are on a hard drive, runs on both Windows and Linux, created. The first partition is a primary partition with NTFS file system for the Windows operating system, the second partition is an extended partition that contains four logical drives. The first two logical drives in the extended partition are getting some NTFS and a FAT32 partition and storing of files, the other two partitions are a ext3 and a swap partition for the Linux operating system.

Partitioning programs can represent this partition scheme like this:

Primary partition (NTFS ) Extended Partition Logical Drive 1 (NTFS ) Logical Drive 2 ( FAT32) Logical Drive 3 ( ext3) Logical Drive 4 (Swap) Windows normally assigns these partitions to drive letters and this would typically View as:

C: ( Windows operating system, NTFS ) D: ( data 1, NTFS) E: (data 2, FAT32) Windows searches inter alia at the start of the partition table partition types that indicate usable by the operating system file systems. Because Windows Linux file systems can not take advantage of the associated partitions are not normally displayed. Would they point to readable by the operating system file systems, them each a drive letter would be assigned by default. However, it should be noted that the unity of the file system and partition type is not mandatory. Was changed, for example, the partition type ext3 partition directly in the partition table on the type 0x07 (NTFS ) or 0x0B ( FAT32), this would appear under Windows entirely. Because on this but lacks the expected administrative structure of the file system ( File Allocation Table or Master File Table), the partition would be filed at the first read or write attempt as " not formatted ".

A current Linux operating system could, however, show the partitions as follows:

/ dev/sda1 (primary partition, Windows operating system, NTFS ) / dev/sda2 (extended partition) / dev/sda5 ( 1 logical drive on the extended partition, data 1, NTFS) / dev/sda6 ( second logical drive on the extended partition, data 2, FAT32) / dev/sda7 (Linux, ext3) / dev/sda8 (Linux swap) / dev/sda1 to / dev/sda4 here are the four possible MBR partitions, only the first two of which are used. The remaining logical drives from / dev/sda5 are in the extended partition. / dev/sda2 contains as an extended partition itself is not a file system and therefore can not be mounted in the directory tree.

Requirement for the use of file systems is always the associated driver. What file systems can be integrated and used by the operating system, therefore, is not a question of the operating system itself. While lying in a default Windows installation only drivers for the MS- own file systems FAT and NTFS before, but can be prepared by installation of each driver also quite foreign file systems use such as ext3.

Partitioning Programs

There are a number of programs that facilitate the partitioning. Even simple console and DOS programs like fdisk allow partitioning. Note: Although the command under DOS, Linux, and BSD Unix ( for example Mac OS X) is also called fdisk, it is not to the same program.

The installation programs of the operating systems such as YaST2 for SuSE Linux offer Partitioniermöglichkeiten to accommodate the new operating system in addition to an operating system already installed on the hard disk. This is usually only a frontend for another program (for example, fdisk / parted in the case of YaST2 ).

  • Windows Control Panel → Administrative Tools → Computer Management → Disk Management ( create partitions, delete, etc., data is lost ) ( execution file: diskmgmt.msc )
  • Fixmbr fixboot commands and the Recovery Console
  • Bootsect command with parameters of the Recovery Console
  • Partition Expert Acronis / Acronis Disk Director Suite (includes all HDD Tools Acronis )
  • MiniTool Partition Wizard ( the Home Edition is free )
  • Paragon Hard Disk Manager / Paragon Partition Manager Free Edition (English, used free of charge for private use )
  • Easeus Partition Master ( English ) ( Home Edition, Professional Edition and Server Edition ), free for 32 - and 64 -bit systems usable for private use
  • O & O Partition Manager (Professional and Server Edition )
  • Partition Commander
  • BSD, GNU / Linux fdisk, XFDisk, sfdisk, cfdisk and gdisk their counterparts for GPT, sgdisk, cgdisk
  • Parted, gparted, qtparted, diskdrake provide a more comfortable surface to simultaneously change the size of a partition and the file system mounted thereon.
  • Bootable Live CD - boot without an installed operating system from a RAM disk out. GParted LiveCD about 50 MB - Fast Fluxbox Desktop plus tools: fdisk vi, ntfs -3g, partimage, testdisk, Terminal and Midnight Commander
  • Parted Magic LiveCD / USB about 72 MB - Comfortable XFCE Desktop plus tools: partimage, TestDisk fdisk, sfdisk, gpart, dd, ddrescue, ntfs -3g, etc.
  • grml
  • Knoppix
  • Almost all Linux Live CDs also offer the above programs.
  • Mac OS X Disk Utility ( included in the system ). In German it is called " Disk Utility ".
  • IPartition from Coriolis Systems
  • Console program pdisk (integrated into the system)
  • Console Program for DOS fdisk partitions ( built into the system )
  • DOS fdisk command ( fdisk /? help is available from )
  • FIPS: data -preserving resize partitions
  • Partition Magic ( only as data recovery system partitioning tool under DOS)
  • EXtended Fdisk ( XFDisk ) partition and boot manager (GPL ) - A very powerful boot manager and partitioning program that allows you to boot multiple partitions and also deal with several connected hard drives.
  • OS / 2 fdisk command to v4.0 ( controlled completely via command line, can on its own partition to install a boot manager )
  • FDISKPM to v4.0 ( the graphical version )
  • Logical Volume Manager from v4.5
  • Visopsys (standalone OS) Partition Logic (GNU GPL)

Especially for Unix and Mac OS X there is a set of utilities to create and manage file systems. See Unix commands. Mac OS X used the " Disk Utility " ( on the command line: diskutil ) delivered, the computers are with one partition. Some partitioning tools that allow you to zoom out (if it is free space in the partition ) or increasing (if still free space on the disk ) partitions without data loss, often even the system partition ( the partition from which the currently running operating system is started).

315212
de