【LINUX學習】磁碟分割之新建與刪除
磁碟分割
[root@localhost /]# fdisk -l --列出系統所有的裝置的partition都列出來
Disk /dev/sda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 522 4088542+ 83 Linux
Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 131 1052226 82 Linux swap / Solaris
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
---也可以指定裝置,
[root@localhost /]# fdisk -l /dev/sdc
Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 131 1052226 82 Linux swap / Solaris
[root@localhost /]# fdisk -l /dev/sda
Disk /dev/sda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 522 4088542+ 83 Linux
---建立一個主分割槽,如果使用預設值,會在建立第一個分割槽時就將整個磁碟使用完。
[root@localhost /]# fdisk /dev/sdd
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391): =直接按enter鍵預設391
Using default value 391
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 391 3140676 83 Linux
Command (m for help): n --繼續新增
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
No free sectors available---沒有可用空間了!
--刪除剛才建立的那個分割槽。
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
--新建分割槽
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391): +50M
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 7 56196 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (8-391, default 8):
Using default value 8
Last cylinder or +size or +sizeM or +sizeK (8-391, default 391): +2^H
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 7 56196 83 Linux
/dev/sdd2 8 10 24097+ 83 Linux
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 7 56196 83 Linux
/dev/sdd2 8 10 24097+ 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (11-391, default 11):
Using default value 11
Last cylinder or +size or +sizeM or +sizeK (11-391, default 391):
Using default value 391
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 7 56196 83 Linux
/dev/sdd2 8 10 24097+ 83 Linux
/dev/sdd3 11 391 3060382+ 83 Linux
--刪除第三個分割槽
Command (m for help): d
Partition number (1-4): 3
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 7 56196 83 Linux
/dev/sdd2 8 10 24097+ 83 Linux
--刪除第二個分割槽
Command (m for help): d
Partition number (1-4): 2
Command (m for help):m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 刪除一個分割槽
l list known partition types
m print this menu
n add a new partition 新增一個分割槽
o create a new empty DOS partition table
p print the partition table
q quit without saving changes 不儲存,離開
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit 寫入並儲存
x extra functionality (experts only)
Command (m for help): d
Selected partition 1 --只有一個分割槽,系統幫我們選擇
Command (m for help): p
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): q
[root@localhost /]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-680496/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【LINUX學習】磁碟分割之建立primary和logical 分割槽Linux
- mysql 動態新建以及刪除分割槽表MySql
- Linux 磁碟與磁碟分割槽Linux
- 刪除LINUX分割槽Linux
- Linux 分割槽刪除Linux
- 全面學習分割槽表及分割槽索引(9)--刪除表分割槽索引
- LINUX學習(九)Linux目錄的建立與刪除命令Linux
- 全面學習分割槽表及分割槽索引(16)--增加和刪除索引分割槽索引
- Linux核心之磁碟和分割槽Linux
- windows10分割槽無法刪除怎麼辦_win10系統磁碟刪除分割槽的方法WindowsWin10
- 資料表分割槽分割與刪除歷史資料
- linux下磁碟分割槽與格式化Linux
- Linux 學習基礎入門之Linux分割槽Linux
- swap分割槽新增刪除
- ASM磁碟分割槽或者裝置檔案刪除後恢復的方法ASM
- 【ASM學習】手工刪除ASM磁碟組時提示錯誤ORA-15039ASM
- 在ASM磁碟組中刪除一個磁碟ASM
- 【LINUX學習】檢視磁碟與目錄的資訊Linux
- ASM磁碟組刪除DISK操作ASM
- ORACLE 刪除無用分割槽Oracle
- rabbitmq 學習與實踐分享之網路分割槽MQ
- linux磁碟分割槽講解Linux
- linux 磁碟分割槽_luks cryptsetupLinux
- 【實驗】【PARTITION】RANGE分割槽表刪除分割槽
- win10 oem分割槽怎麼刪除_win10 oem分割槽可以刪除嗎Win10
- win10分割槽好了怎麼刪除_win10分割槽完後如何刪除Win10
- 迴文分割;及刪除字元分析字元
- delete_partition.pl 刪除分割槽delete
- Linux學習筆記:rm刪除檔案和資料夾Linux筆記
- Linux學習筆記--rm命令(刪除檔案或目錄)Linux筆記
- 官方文件學習:RAC刪除節點
- Linux 磁碟分割槽和掛載Linux
- linux 新增磁碟 分割槽掛載Linux
- linux 磁碟分割槽掛載-fdiskLinux
- linux磁碟分割槽基本命令Linux
- Linux下磁碟分割槽,fdisk,mkfsLinux
- Linux精講——fdisk磁碟分割槽Linux
- linux下磁碟分割槽的案例Linux