Linux 下硬盤(pán)分區(qū)實(shí)踐
1、linux下硬盤(pán)管理簡(jiǎn)介
和Windows為每一個(gè)分區(qū)設(shè)定一個(gè)驅(qū)動(dòng)和盤(pán)符不同,Linux把所有的硬盤(pán)當(dāng)作一個(gè)整體來(lái)看--全部掛載于/文件系統(tǒng)下面。但是Linux還是沿用MS/DOC的硬盤(pán)物理分區(qū)模式:主分區(qū)(擴(kuò)展分區(qū))+邏輯分區(qū)(logical)模式。這里區(qū)分一下主分區(qū)(primary)和擴(kuò)展分區(qū)(extended),簡(jiǎn)單的說(shuō),一塊硬盤(pán)最多有4個(gè)主分區(qū),如果需要繼續(xù)增加硬盤(pán)的分區(qū),那么就要把主分區(qū)設(shè)置成擴(kuò)展分區(qū),在擴(kuò)展分區(qū)上面進(jìn)行邏輯分區(qū)的劃分,而邏輯分區(qū)的數(shù)量是沒(méi)有限制的。實(shí)際上應(yīng)該說(shuō):主分區(qū)數(shù)目+擴(kuò)展分區(qū)數(shù)目<=4。
2、linux下分區(qū)工具fdisk
用法:fdisk device。
進(jìn)去之后,輸入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)
|
|