切 /dev/ada1 為例子
STEP 1. 先用
gpart show
查看目前的硬碟資訊gpart show
STEP 2. 建立GPT Partition於ada1
gpart create -s GPT ada1
STEP 3. 查看gpart 狀態
gpart show
=> 63 976561551 ada0 MBR (466G)
63 976559157 1 freebsd [active] (466G)
976559220 2394 - free - (1.2M)
=> 0 976559157 ada0s1 BSD (466G)
0 50331648 2 freebsd-swap (24G)
50331648 33554432 1 freebsd-ufs (16G)
83886080 67108864 4 freebsd-ufs (32G)
150994944 67108864 5 freebsd-ufs (32G)
218103808 67108864 6 freebsd-ufs (32G)
285212672 67108864 7 freebsd-ufs (32G)
352321536 624237621 8 freebsd-ufs (298G)
=> 34 4882808253 ada1 GPT (2.3T)
34 4882808253 - free - (2.3T)
STEP 4. 於ada1上增加type為freebsd-ufs的partition
gpart add -b 34 -s 4882808253 -t freebsd-ufs ada1
其中,-b -s -t 是絕對必要參數
-b:start
-s:size
-t:fs_type
STEP 5.再執行
gpart show
可以看到該生出來的已經生出來=> 63 976561551 da0 MBR (466G)
63 976559157 1 freebsd [active] (466G)
976559220 2394 - free - (1.2M)
=> 0 976559157 ada0s1 BSD (466G)
0 50331648 2 freebsd-swap (24G)
50331648 33554432 1 freebsd-ufs (16G)
83886080 67108864 4 freebsd-ufs (32G)
150994944 67108864 5 freebsd-ufs (32G)
218103808 67108864 6 freebsd-ufs (32G)
285212672 67108864 7 freebsd-ufs (32G)
352321536 624237621 8 freebsd-ufs (298G)
=> 34 4882808253 ada1 GPT (2.3T)
34 4882808253 1 freebsd-ufs (2.3T)
=> 34 4882808253 ufsid/4cecc4f9c9eaaa33 GPT (2.3T)
34 4882808253 1 freebsd-ufs (2.3T)
STEP 6.執行newfs
newfs -O2 -U /dev/ada1p1
Step 7.執行mount測試
mount /dev/ada1p1 /mnt
沒有留言:
張貼留言