Installation


Upgrades


DTC-Xen Installation


DTC-Xen / Dom0 Howtos

DTC-Xen / DomU Howtos

FAQ


DTC Howtos


Manuals


Features


Roadmap


Devel docs


Wiki - i18n


Wiki - Meta


Managing big partitions bigger than 2TB

This page is part 5/6 in our A server with DTC-Xen tutorial.
(Make sure you follow the step one after the other)

1. Background

The msdos MBR (sector zero, or otherwise called LBA0) is devided in 2 parts. The first 473 bytes of the first sector of your hard drive is the bootstrap code. The remaining is the msdos partition table. Unfortunately, this partition table is using 32 bits only, so it's limited to 2TB hard drives max. Any attempt to create bigger partition using standard tools will fails. cfdisk, fdisk and so on are known to be incompatible (as of writing: maybe now they do support bigger hard drives).

2. How to bypass the limitation

The new format is called GPT (for GUID Partition Table), and also stands for "partition label". I don't really understand what's the goal of this "label" and where the name is really used, but hey, I know it works.

The new format is backward compatible with the old msdos format, as it keeps the standard MBR in LBA0. In fact it's an extension to it, luckily, so you can still boot the "old way" on your hard drive (just make sure that the boot partition is BEFORE the 2TB limit).

The utility parted knows how to work out with it. In fact, it's using the LAST 32 sectors of your hard drive, and the first 32 sectors right after the LBA0. (note: please correct me if the numbers are wrong here)

3. How to make it work in practice

Just use parted like this:

   parted /dev/sda
   (parted) mklabel gpt

Then to make a partition:

   (parted) mkpartfs primary ext2 0 3TB

If you also want to format it at the same time:

   (parted) mkpart primary ext2 0 4TB
   (parted) set 1 lvm on

Note that "gpt" can be anything, and that it really doesn't mater (as much as I know), but just keep it "gpt" as it's there on so many examples.

Then the usual steps apply if you want to create a lvm volume:

   pvcreate /dev/sdc1
   vgcreate nas2vg1 /dev/sdc1
   vgchange -a y nas2vg1

4. Next step

Nothing special, Linux will recognize the GPT disk partitions out of the box. Just use the newly created partitions that should be automatically be detected by dbus.

Page last modified on July 20, 2012, at 03:34 PM EST