Cafes start to use disks in 4TB, however, diskless server can support MBR partition table only which cannot handle partitions larger than 2TB. We need to add GPT partition table support to handle this, in addition, also need to support disk i/o with offset beyond 32bit.
First of all, add GPT at image management level, use a 300MB VHDX file to do the partition layout verification.
A diskless server actually writes several bytes at the beginning of the partition data(in RAM) when we mount a partition in diskless server. it can not work when we need to use GPT, because GPT has a bigger header. By append 1MB in front of real partition data, we can write either MBR header or GPT header.
[GPT header][Partition array][Partition Data][Backup Partition array][Backup GPT header]
Secondly, add large offset support at SCSI level(iSCSI is based on SCSI). Thanks to Seagate’s documents, I added following SCSI command: Read_Capacity_16,Read_16,Write_16
The two 6TB partitions are from real disks, mounted on the server.
The 30TB partition is from a VHDX disk, also mounted on the server.
MBR partition document:
GPT partition document: