快速业务通道

处理freebsd下大约2T的硬盘空间

作者 佚名技术 来源 操作系统 浏览 发布时间 2012-06-27

这几天处理一台盘阵(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.

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号