Is GPT needed on a 16 TB data disk?
I have made /dev/sdb
which is a 16 TB disk using hardware RAID, where I am temped to put XFS directly on /dev/sdb
without making partitions. In the future will I need to expand this to double the size.
The hardware is an HP ProLiant DL380 Gen 9 with 12 SAS disk trays in the front.
One advantage of not making partitions is that a reboot isn't needed, but are things different on >2 TB disks?
Do I need to have a GPT, or can I run into trouble when expanding the RAID array and XFS without one?
Solution 1:
You can do this without any problems...
I'm assuming /dev/sdb is a separate HP Smart Array Logical Drive.
Don't use any partitioning for this setup... Just create the filesystem on the block device:
mkfs.xfs -f -l size=256m,version=2 -s size=4096 /dev/sdb
When you want to expand at a later date, add disks and expand the HP logical drive using the hpssacli
or Smart Storage Administrator tools.
You can rescan the device to get the new size with:
echo 1 > /sys/block/sdb/device/rescan
Confirm the device size change with dmesg|tail
.
At that point, you can run xfs_growfs /mountpoint
(not device name) and the filesystem will grow online!
Solution 2:
GPT is about partitioning disks and partition tables. So if you plan to put the XFS filesystem on the disk, without having partitions you do not need a GPT label.
The GPT label would be destroyed as soon as you create the filesystem on /dev/sdb
. One thing to remember is that GPT also creates a backup label at the end of the disk. Some tools ( partprobe
or partx
) try to "repair" the GPT of a disk if a backup is found. Some tools even do that without asking, which then would result in a thrashed filesystem. Some EFI BIOSes also provide such a "feature".
So you should ensure that there is no backup GPT label on /dev/sdb
by using e.g. gdisk
.
In general I would recommend to partition the disk, which is also helpful for other team members or admins to recognize that the disk is in use. It's e.g. harder to tell if a disk is in use when it is not partitioned.
You also normally do not need a reboot after partitioning the disk.