kakubei
August 26th, 2008, 04:12 PM
Hello, this is a question I've seen in many places and one problem I have struggled with for a long time until I found the solution and thought I would share it with others in the hopes that it will help someone.
fdisk has a limit of 2 TB for an individual partition, regardless of the size of your drive (array or not).
Indeed it is the MSDOS partition table that has this limitation. So if you are having this problem, here is the solution:
1. delete the partition and the table.
2. create a new partition table. WARNING: creating a new partition table will indeed destroy all the data in your drives. Deleting the partition will NOT destroy data if you create it again with the same beginning.
3. create a type gtp partition table.
4. create the new partition with whatever size you want.
With parted it goes like this
parted /dev/sdx (where sdx is the drive you are trying to resize/partition)
(parted) mktable gpt
(parted) New disk label type? [msdos]? gpt
(parted) mkpart primary 0 100%
quit parted
go back in
parted /dev/sdx
(parted) mkfs
Warning: The existing file system will be destroyed and all data on the partition will be lost. Do you want to continue?
Yes/No? yes
Partition number? 1
File system? [ext2]?
Now you have a partition that doesn't have a 2TB restriction.
I insist: be careful, recreating a partition table destroys all data.
Recreating the file system (via mkfs) destroys all data.
Backup all your data before attempting anything with any partitioning tool!
Cheers.
fdisk has a limit of 2 TB for an individual partition, regardless of the size of your drive (array or not).
Indeed it is the MSDOS partition table that has this limitation. So if you are having this problem, here is the solution:
1. delete the partition and the table.
2. create a new partition table. WARNING: creating a new partition table will indeed destroy all the data in your drives. Deleting the partition will NOT destroy data if you create it again with the same beginning.
3. create a type gtp partition table.
4. create the new partition with whatever size you want.
With parted it goes like this
parted /dev/sdx (where sdx is the drive you are trying to resize/partition)
(parted) mktable gpt
(parted) New disk label type? [msdos]? gpt
(parted) mkpart primary 0 100%
quit parted
go back in
parted /dev/sdx
(parted) mkfs
Warning: The existing file system will be destroyed and all data on the partition will be lost. Do you want to continue?
Yes/No? yes
Partition number? 1
File system? [ext2]?
Now you have a partition that doesn't have a 2TB restriction.
I insist: be careful, recreating a partition table destroys all data.
Recreating the file system (via mkfs) destroys all data.
Backup all your data before attempting anything with any partitioning tool!
Cheers.