这几天处理一台盘阵(750Gx16块硬盘),做了2个RAID5,每个有4.2T左右的空间。需要挂载到一台server上,server的系统是freebsd6.2。
我进行如下操作:
gpt create -f /dev/da2
gpt create -f /dev/da3
gpt show -l /dev/da2
查出分区的块大小是:8606187453
准备分四片,所以每片是:2151546863
然后执行下面命令,-s是指定分区大小:
gpt add -s 2151546863 -t ufs /dev/da2 (将产生/dev/da2p1)
gpt add -s 2151546863 -t ufs /dev/da2 (将产生/dev/da2p2)
gpt add -s 2151546863 -t ufs /dev/da2 (将产生/dev/da2p3)
gpt add -t ufs /dev/da2 (把剩余的全做为最后一个分区)
下面重新格式化文件系统:
newfs -m 0 /dev/da2p1
newfs -m 0 /dev/da2p2
newfs -m 0 /dev/da2p3
newfs -m 0 /dev/da2p4
挂载分区:
mount /dev/da2p1 /mnt/da2p1
mount /dev/da2p2 /mnt/da2p2
mount /dev/da2p3 /mnt/da2p3
mount /dev/da2p4 /mnt/da2p4
查看是否挂载正确:
df -h
/dev/da2p1 994G 4.0K 994G 0% /mnt/da2s1d
/dev/da2p2 994G 4.0K 994G 0% /mnt/da2s1e
/dev/da2p3 994G 4.0K 994G 0% /mnt/da2s1f
/dev/da2p4 994G 4.0K 994G 0% /mnt/da2s1g
/dev/da3p1 994G 4.0K 994G 0% /mnt/da3s1d
/dev/da3p2 994G 4.0K 994G 0% /mnt/da3s1e
/dev/da3p3 994G 4.0K 994G 0% /mnt/da3s1f
/dev/da3p4 994G 4.0K 994G 0% /mnt/da3s1g
Acronym for GUID Partition Table
GPT was introduced for iA64 systems, to get around a fixed 32 bit issue (2 to the power of 32 is 4 billion times a 512 byte block equals 2 Terabytes) in the PC-BIOS Partition table. Partitions larger than 2 TB require using a GPT disklabel, which differs from the PC-BIOS Partition table in a number of ways:
* Is easily extensible.
* Can contain up to 128 primary partitions, as opposed to 4, so there’s no need for extended partitions.
* Allows Partitions larger than 2 TB.
* Identifies Partitions with a GUID so you can reference that Partition even if disks are moved around.
* Identifies Partition type with a GUID, thus avoiding the type conflicts that plague the PC-BIOS Partition table format.
* Provides a 46(?) character UTF-16 partition label to identify Partitions.
* Has a "fake" MBR for backwards compatibility.
* Includes a CRC32 to detect corrupt Partition tables.
* Stores a backup Partition table at the end of the disk.
Most partitioning tools under Linux will fail to do anything sensible with a > 2 TB Partition. As of this writing, parted(8) is the only one that understands them and will let you set the GPT label on the disk.
There is a lot of information stating that you cannot boot off a GPT enabled device. Most of the claims imply that the fault is with LILO or GRUB not understanding GPT devices. We’ve not tested this, but GPT and traditional MBRs will coexist.

