# [solved] maximum partition size

## majoron

Hi,

I've just set up a raid (raid5) having 4TB of total capacity and wanted to make a partition with this size.

When I use fdisk or cfdisk to make the partition, they both tell me that the disk is 4TB big, but they allow only about 2TB in one partition.

I have checked that I have "Support for Large Block Devices" enabled in the kernel, so in principle I'd be able to have a disk device with size bigger than 2TB.

What am I doing wrong?

Thanks in advance.

----------

## Berticus

Use parted instead: http://www.unixgods.org/~tilo/linux_larger_2TB.html

----------

## frostschutz

If you want the whole thing to be one partition, you can just mkfs the device directly, no need to actually partition it.

----------

## tgR10

sudo su 

cd /usr/src/linux && make menuconfig

--- Enable the block layer  --->  

[*]   Support for Large Block Devices

----------

## manaka

The standard msdos partition table has a 2 TB limit... You need to use another format like GPT that doesn't have this limit...

parted is able to handle GPT... You also need a kernel supporting GPT (CONFIG_EFI_PARTITION).

As for GRUB, latest versions in Portage include a patch to make it able to handle GPT...

----------

## majoron

Thanks a lot to everyone for sharing his/her wisdom.

 *Quote:*   

> sudo su
> 
> cd /usr/src/linux && make menuconfig
> 
> --- Enable the block layer --->
> ...

 

As you can see my first post says that this was already enabled.

 *Quote:*   

> Use parted instead: http://www.unixgods.org/~tilo/linux_larger_2TB.html

 

I didn't mention it, but I also (naively) tried it with parted. I didn't get it. However manaka gave me the key:

 *Quote:*   

> The standard msdos partition table has a 2 TB limit... You need to use another format like GPT that doesn't have this limit...
> 
> parted is able to handle GPT... You also need a kernel supporting GPT (CONFIG_EFI_PARTITION).
> 
> As for GRUB, latest versions in Portage include a patch to make it able to handle GPT...

 

I didn't find this option in the kernel, but fortunately it wasn't necessary to tune the kernel (whatever option is needed was already selected); moreover the disk is going to be used as data disk, so there are no need of boot loaders tricks.

So I started parted and before making the partition with "mkpart" I did the following:

```
mklabel gpt
```

And "mkpart" works now with the whole disk. Gracias manaka  :Wink: 

(Just as an informative note: according to wikipedia, in order to have more than 2TiB with ext3 one has to select a block size bigger or equal than 2KiB, and that's what I did) 

 *Quote:*   

> If you want the whole thing to be one partition, you can just mkfs the device directly, no need to actually partition it.

 

Thanks; it looks also promising, but it was my "b" plan. As parted worked fine there was no need of anything else.

Best regards.

----------

