Hetzner - DokuWiki

Partitionsgrößenlimit bei großen Festplatten/en

Inhaltsverzeichnis

General Information

At present, the installimage script only supports the creation of a GPT partition table for Debian 6.0 and Ubuntu. This is needed in order to bypass the 2 terabyte partition size limit of the older MS-DOS partition table. Information about the MS-DOS partition table may be found at wikipedia (http://en.wikipedia.org/wiki/Partition_table ).


All other images still use the MS-DOS format partition table. So that the whole 3 terabytes of the new EX models can be used here, the standard partitioning scheme of hard disks larger than 2 terabytes has been adapted as follows:


PART swap swap 32G
PART /boot ext3 512M
PART / ext4 1024G
PART /home ext4 all


All other servers continue to use the old scheme:


PART swap swap 2G
PART /boot ext3 512M
PART / ext4 all



As partitions may only be a maximum of 2 terabytes in size, the remaining storage space needs to be divided up into the previous partitions. For a 3 terabyte hard disk at least 1 TB (maximum 2 TB) needs to be split into the previous partitions. The following scheme would, therefore, be possible:


PART swap swap 32G
PART /boot ext3 512M
PART / ext4 1024G
PART /var ext4 200G
PART /usr ext4 300G
PART /home ext4 all


With the ensuing scheme, the 3 terabytes were not able to be used completely (as the maximum size for a partition is 2 terabytes (/home)):


PART swap swap 32G
PART /boot ext3 512M
PART / ext4 40G
PART /home ext4 all


The following scheme also shows the 3 terabytes not being fully exploited:


PART swap swap 32G
PART /boot ext3 512M
PART / ext4 40G
PART /var ext4 100G
PART /usr ext4 200G
PART /home ext4 all


This is due to the structure. The last three partitions (/var,/usr,/home) are created in an extended partition, which in turn can only be a maximum of 2 terabytes in size. As the first 3 partitions do not account for at least 1 terabyte in size, complete usage is not possible here either.


In this example, as with the previous one, the installimage script limits the maximum partition size to 2 terabytes.


RAID

The size limit only applies to the partition table. This means, that a Sofware RAID Level 5, for example, results in a RAID partition of 4 terabytes over three 2 TB partitions. This is not the case when using a hardware RAID controller. In this case, a partition may be a maximum of 2 terabytes in size.


Hardware RAID Controller

In order to be able to use the full capacity of the hard disks, RAID has to be created twice on the same hard disks. One RAID for the bootable partition, e.g. 200 GB, and a RAID for the remaining hard disk space.


Example

For this example, 3 x 3 TB hard disks in a RAID Level 5 scheme have been used. Two RAIDS need to be created.


  1. one RAID on which the bootable system is to be installed, ca. 200 GB in size.
  1. one RAID which covers the remaining disk space. In this example ~ 5,8 TB in size.


Adaptec Hardware RAID Controller

So that the RAID controller recognizes >2 TB hard disks, the firmware needs to have at least build 17911. If this is not the case, please contact our support team.


RAID 5 over 200 GB for the bootable system:


arcconf create 1 LOGICALDEVICE 200000 5 0 0 0 1 0 2 noprompt


RAID 5 over the remainder of the hard disks:


arcconf create 1 LOGICALDEVICE MAX 5 0 0 0 1 0 2 noprompt


General details are available here Adaptec RAID Controller


LSI Hardware RAID Controller

RAID 5 over 200 GB for the bootable system:


megacli -CfgLdAdd -r5 [252:0,252:1,252:2] WB ADRA Cached CachedBadBBU -sz200GB -a0


RAID 5 over the remainder of the hard disks:


megacli -CfgLdAdd -r5 [252:0,252:1,252:2] WB ADRA Cached CachedBadBBU -a0


General details are available here LSI RAID Controller in German.


Installation and Partitioning

Now installimage can be performed. Some adjustment is necessary here: only /dev/sda is used for hard disks, the other(s) have to be commented out using #. Software RAID also needs to be switched off (set to 0).


After installing the operating system, a partition can be created on the second RAID, so that this can be used. Here a GPT partition table is used instead of the MS-DOS partition table which enables > 2 TB partitions. These steps can be performed in the Rescue System.


  • gdisk /dev/sdb
  • n for new partition
  • with Enter accept the default value for the partition number
  • with Enter accept the default value for the partition start
  • similarly with Enter accept the default value for the partition end
  • Enter the hex code for the partition data type (0700 for Linux/Windows data)
  • with w finally save the amendments.


The partition can now be formatted:


mkfs.ext4 /dev/sdb


Finally, the file /etc/fstab needs to be edited with the following entry:


/dev/sdb1  /mnt  ext4  defaults  0  1


Background

The installimage script uses the MS-DOS partitioning scheme. This partitioning scheme is only in a position to manage hard disks of up to 4 terabytes in size and partitions of up to a maximum of 2 terabytes. The technical reasons for this limitation may be read in Wikipedia.



© 2020. Hetzner Online GmbH. Alle Rechte vorbehalten.