Linux入門實踐筆記(三)——資料盤格式化和和多分割槽掛載
阿新 • • 發佈:2018-12-17
[[email protected] ~]$ sudo fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
#如果有舊的分割槽,可以輸入d進行刪除。
Command (m for help): d
Selected partition 3
Partition 3 is deleted
#首先輸入 n 並按回車鍵:建立一個新分割槽。
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free) #主分割槽型別
e extended #擴充套件分割槽型別
#輸入 p 並按回車鍵:選擇主分割槽型別
Select (default p): p
#輸入分割槽編號並按回車鍵
Partition number (1-4, default 1): 1
#輸入第一個扇區的編號
First sector (2048-104857599, default 2048):
Using default value 2048
#輸入最後一個扇區的編號
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): 52400000
Partition 1 of type Linux and of size 25 GiB is set
#重複執行上述4個步驟,建立第二個分割槽
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2): 2
First sector (52400001-104857599, default 52400128):
Using default value 52400128
Last sector, +sectors or +size{K,M,G} (52400128-104857599, default 104857599):
Using default value 104857599
Partition 2 of type Linux and of size 25 GiB is set
#最後輸入 wq 並按回車鍵,開始分割槽。
Command (m for help): wq
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.