分區(qū)方式改變,可使用的分區(qū)為 slices 0–6,其中的 2 分區(qū)也是一個普通的可用分區(qū)了.
一個分區(qū)時不可與其他分區(qū)片或label片 (backup label)重疊。EFI label 占用 34 個扇區(qū)(sector),因此其它分區(qū)的起始扇區(qū)必定是從 sector 34開始。也就是說,不再存在從 sector 0開始的分區(qū)。
EFI label 不保存磁盤的柱面(cylinder)、磁頭(head)、扇區(qū)(sector)信息。所以使用EFI label 時,都以扇區(qū)號進行操作,分區(qū)大小用“塊”(block)來表示。
磁盤信息原來保存在備用柱面區(qū)域中(alternate cylinders area, 磁盤的最后兩個柱面),EFI label 則保存在 slice 8 中。
使用 format 工具修改 partition 時,凡大小為零的分區(qū),都被自動賦予“unassigned”標(biāo)簽(tag);凡大小不為零的分區(qū),則都賦予缺省標(biāo)簽“usr”。分區(qū)分好后,可使用partition>change 菜單來修改容量不為零的分區(qū)標(biāo)簽(但不可改為“unassigned”標(biāo)簽)。
EFI Label 有一些限制。因此,應(yīng)該根據(jù)下面的限制來考慮,是否應(yīng)該在應(yīng)用環(huán)境中采用大于1TB的磁盤(及邏輯磁盤)。如果不希望受到 EFI label 帶來的局限,那么則不應(yīng)使用大于1TB的盤(如是陣列邏輯盤,則應(yīng)將邏輯盤容量劃?。FI Label的局限主要有:
當(dāng)前的 SCSI 驅(qū)動(ssd)僅支持最多 2 TB 容量。如果需要大于 2 TB 的容量,應(yīng)采用 Solaris Volume Manager 之類的存儲管理工具來創(chuàng)建大容量設(shè)備。
某些 Layered software products,雖然聲稱可以支持 EFI-labeled 磁盤,但在實用中可能無法正確訪問 EFI label 盤。
早期 Solaris 版本無法識別 EFI label。
EFI label 不支持 IDE 盤。
EFI label 盤不可做啟動盤。
Solaris Management Console 的 Disk Manager 工具不能管理 EFI label 盤,只能使用 format 工具來對 EFI label 盤進行分區(qū),然后再用 Solaris Management Console 的 Enhanced Storage 工具來管理 EFI label 盤上的卷(volume)或磁盤包(disk set)。
EFI 中不可使用重疊分區(qū),因此原來的2分區(qū)不再代表全盤。此時,全盤表示方法為 cxtydz.
EFI label 的盤或分區(qū)的容量信息中不再出現(xiàn)柱面、磁頭等參數(shù),而采用扇區(qū)或塊為單位。
對 EFI label盤,format 工具中的部分選項/子命令不再可用:
– save 選項不被支持,因為 EFI label 盤不再需要用到 format.dat 中的記錄。
– backup 選項不可用,因為磁盤驅(qū)動找到 primary label 后即可將它寫回到盤上(執(zhí)行步驟與VOTC方式全然不同了)
下面看看EFI label的實用例子。
例1、EFI label 盤的全盤復(fù)制
在原來的VTOC方式中,2分區(qū) (s2) 代表全盤,因此工程師們都習(xí)慣使用 dd 來進行全盤復(fù)制:
dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t2d0s2 bs=128k
對EFI label 盤的復(fù)制則不同了。一是EFI label 沒有 s2,二是EFI label 盤上的有一個UUID(Universally Unique Identifer),直接復(fù)制會導(dǎo)致兩盤的UUID重復(fù),某些軟件產(chǎn)品讀到重復(fù)UUID時會發(fā)生數(shù)據(jù)問題,因此需要在復(fù)制后重新生成UUID。
看例子:
1. 全盤數(shù)據(jù)克隆先:
# dd if=/dev/rdsk/c0t0d0 of=/dev/rdsk/c0t2d0 bs=128k
2. 將源盤的 prtvtoc 輸出定向到 fmthard 命令,以生成目標(biāo)盤的新 label:
# prtvtoc /dev/rdsk/c0t0d0 | fmthard -s – /dev/rdsk/c0t2d0
例2、創(chuàng)建 EFI 或 SMI label
對于小于1TB的盤,既可以使用VTOC label,也可以使用 EFI label。如果使用常規(guī)的不帶參數(shù)的 format 命令,如原盤已 label,那么將不會改變原來的 label 類型;如未 label,則會提示進行 label,采用常規(guī)的VTOC類型。如果需要選擇指定 label 類型,或需要改變原有的 label 類型,則可以使用 format -e 參數(shù)。
我們熟知的常規(guī) format>label 命令的提示是這樣的:
# format
Searching for disks…done
……
format> lable
Ready to label disk, continue?
帶 -e 參數(shù)的format>label 命令則是這樣:
# format -e
Searching for disks…done
……
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]: 0
Ready to label disk, continue?
上面提供了 label 類型的選擇菜單。
例3、使用 format 工具,將一個 1.15 TB 的 EFI label 盤分為 3 個片區(qū)
# format
……
partition> modify
Select partitioning base:
0. Current partition table (original)
1. All Free Hog
Choose base (enter number) [0]? 1
Part Tag Flag First Sector Size Last Sector
0 root wm 0 0 0
1 usr wm 0 0 0
2 unassigned wm 0 0 0
3 unassigned wm 0 0 0
4 unassigned wm 0 0 0
5 unassigned wm 0 0 0
6 usr wm 0 0 0
8 reserved wm 2576924638 8.00MB 2576941021
Do you wish to continue creating a new partition
table based on above table[yes]? y
Free Hog partition[6]? 4
Enter size of partition 0 [0b, 34e, 0mb, 0gb, 0tb]:
Enter size of partition 1 [0b, 34e, 0mb, 0gb, 0tb]:
Enter size of partition 2 [0b, 34e, 0mb, 0gb, 0tb]: 400gb
Enter size of partition 3 [0b, 838860834e, 0mb, 0gb, 0tb]: 400gb
Enter size of partition 5 [0b, 1677721634e, 0mb, 0gb, 0tb]:
Enter size of partition 6 [0b, 1677721634e, 0mb, 0gb, 0tb]:
Part Tag Flag First Sector Size Last Sector
0 unassigned wm 0 0 0
1 unassigned wm 0 0 0
2 usr wm 34 400.00GB 838860833
3 usr wm 838860834 400.00GB 1677721633
4 usr wm 1677721634 428.77GB 2576924637
5 unassigned wm 0 0 0
6 unassigned wm 0 0 0
8 reserved wm 2576924638 8.00MB 2576941021
Ready to label disk, continue? yes
partition> q
例4、顯示磁盤 label 信息
# prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 15 tracks/cylinder
* 945 sectors/cylinder
* 8894 cylinders
* 8892 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 1048950 3381210 4430159 /
1 3 01 0 1048950 1048949
2 5 00 0 8402940 8402939
7 8 00 4430160 3972780 8402939 /export/home
這是一個VTOC label 盤。
# prtvtoc /dev/rdsk/c3t1d0s0
* /dev/rdsk/c3t1d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 2479267840 sectors
* 2479267773 accessible sectors
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 34 262144 262177
1 3 01 262178 262144 524321
6 4 00 524322 2478727100 2479251421
8 11 00 2479251422 16384 2479267805
這是一個 EFI label 盤。
原文地址:http://www.chinaunix.net/old_jh/6/955384.html
更多關(guān)于云服務(wù)器,域名注冊,虛擬主機的問題,請訪問西部數(shù)碼官網(wǎng):www.ps-sw.cn