歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> 關於Unix

處理freebsd下大約2T的硬盤空間


這幾天處理一台盤陣(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.
Copyright © Linux教程網 All Rights Reserved