Linux創建磁盤并磁區
文章目錄
- Linux創建磁盤并磁區
- 一、創建磁盤
- 二、磁盤磁區
- 1.fdisk /dev/sdb
- 2.磁區顯示
- 總結
一、創建磁盤
1.編輯虛擬機設定
2.點擊硬碟后添加

3.依次選擇下一步默認即可
4.最后點擊完成

二、磁盤磁區
1.fdisk /dev/sdb
n:創建一個新磁區
p:主磁區
e:擴展磁區
磁區號,默認為1
起始扇區,默認為2048
+1G:磁區大小為1G
代碼如下(示例):
[root@Yang1 ~]# fdisk /dev/sdb
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.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +1G
Partition 1 of type Linux and of size 1 GiB is set
2.磁區顯示
重復上述操作即可
代碼如下(示例):
Command (m for help): p
Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00014254
Device Boot Start End Blocks Id System
/dev/sdb1 2048 2099199 1048576 83 Linux
/dev/sdb2 2099200 4196351 1048576 83 Linux
/dev/sdb3 4196352 6293503 1048576 83 Linux
/dev/sdb4 6293504 8390655 1048576 5 Extended
總結
提示:這里對文章進行總結:
例如:以上就是今天要講的內容,本文僅僅簡單介紹了磁盤如何磁區,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/352318.html
標籤:其他
