|
Linux 下硬盤分區(qū)實踐
1、linux下硬盤管理簡介
和Windows為每一個分區(qū)設定一個驅(qū)動和盤符不同,Linux把所有的硬盤當作一個整體來看--全部掛載于/文件系統(tǒng)下面。但是Linux還是沿用MS/DOC的硬盤物理分區(qū)模式:主分區(qū)(擴展分區(qū))+邏輯分區(qū)(logical)模式。這里區(qū)分一下主分區(qū)(primary)和擴展分區(qū)(extended),簡單的說,一塊硬盤最多有4個主分區(qū),如果需要繼續(xù)增加硬盤的分區(qū),那么就要把主分區(qū)設置成擴展分區(qū),在擴展分區(qū)上面進行邏輯分區(qū)的劃分,而邏輯分區(qū)的數(shù)量是沒有限制的。實際上應該說:主分區(qū)數(shù)目+擴展分區(qū)數(shù)目<=4。
2、linux下分區(qū)工具fdisk
用法:fdisk device。
進去之后,輸入m查看幫助信息,可以看到:
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) 輸入n增加分區(qū),輸入d刪除分區(qū)。
完成之后輸入w保存。
注意:如果出現(xiàn)
|
|
|