电竞比分网-中国电竞赛事及体育赛事平台

分享

linux 下硬盤分區(qū)

 todaytomo 2007-06-13
Linux 下硬盤分區(qū)實(shí)踐
1、linux下硬盤管理簡(jiǎn)介
      和Windows為每一個(gè)分區(qū)設(shè)定一個(gè)驅(qū)動(dòng)和盤符不同,Linux把所有的硬盤當(dāng)作一個(gè)整體來(lái)看--全部掛載于/文件系統(tǒng)下面。但是Linux還是沿用MS/DOC的硬盤物理分區(qū)模式:主分區(qū)(擴(kuò)展分區(qū))+邏輯分區(qū)(logical)模式。這里區(qū)分一下主分區(qū)(primary)和擴(kuò)展分區(qū)(extended),簡(jiǎn)單的說(shuō),一塊硬盤最多有4個(gè)主分區(qū),如果需要繼續(xù)增加硬盤的分區(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)
WARNING: Re-reading the partition table failed with error 16: Device or resource
busy.
The kernel still uses the old table.
The new table will be used at the next reboot.

則表示內(nèi)核沒(méi)有立刻更新硬盤表項(xiàng)需要重啟的時(shí)候更新,但這是由于新分的硬盤沒(méi)有格式化可能會(huì)導(dǎo)致文件系統(tǒng)監(jiān)測(cè)不能通過(guò)。
解決的辦法是用portprobe命令來(lái)更新內(nèi)核的硬盤表項(xiàng)。這樣就不需要重啟了。
 

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多