簡述:云服務(wù)器硬盤如何分區(qū)?一般我們在安裝云服務(wù)器操作系統(tǒng)的過程中,已經(jīng)對系統(tǒng)硬盤進行了分區(qū),但如果新添加了一塊硬盤,想要正常使用,在 Linux 中有專門的分區(qū)命令 fdisk 和 parted。其中 fdisk 命令較為常用,但不支持大于 2TB 的分區(qū);如果需要支持大于 2TB 的分區(qū),則需要使用
云服務(wù)器硬盤如何分區(qū)?一般我們在安裝云服務(wù)器操作系統(tǒng)的過程中,已經(jīng)對系統(tǒng)硬盤進行了分區(qū),但如果新添加了一塊硬盤,想要正常使用,在 Linux 中有專門的分區(qū)命令 fdisk 和 parted。
其中 fdisk 命令較為常用,但不支持大于 2TB 的分區(qū);如果需要支持大于 2TB 的分區(qū),則需要使用 parted 命令,當然 parted 命令也能分配較小的分區(qū)。我們先來看看如何使用 fdisk 命令進行分區(qū)。
fdisk 命令的格式如下:
[root@localhost ~]# fdisk ~l#列出系統(tǒng)分區(qū)[root@localhost ~]# fdisk 設(shè)備文件名#給硬盤分區(qū)
注意,千萬不要在當前的硬盤上嘗試使用 fdisk,這會完整刪除整個系統(tǒng),一定要再找一塊硬盤,或者使用虛擬機。
以硬盤 /dev/sdb 為例做練習,命令如下:
[root@localhost ~]# fdisk /dev/sdb#給/dev/sdb分區(qū)Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0xed7e8bc7.Changes will remain in memory only, until you decide to write them.After that, of course, the previous content won't be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)WARNING: DOS-compatible mode is deprecated.it's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').Command (m for help):m#交互界面的等待輸入指令的位置,輸入 m 得到幫助Command action#可用指令a toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitionI list known partition types m print this menun add a new partitiono create a new empty DOS partition tablep print the partition tableq quit without saving changess create a new empty Sun disklabelt change a partition's system idu change display/entry unitsv verity the partition tablew write table to disk and exitx extra functionality (experts only)
注意這里的分區(qū)命令是 “fdisk /dev/sdb”,這是因為硬盤并沒有分區(qū),使用 fdisk 命令的目的就是建立分區(qū)。
騰佑科技云服務(wù)器簡單易用,穩(wěn)定可靠,主機vCPU、內(nèi)存各項性能指標業(yè)界領(lǐng)先,滿足不斷變化的用戶需求。云服務(wù)器產(chǎn)品鏈接
騰佑科技(www.mubashirfilms.com)成立于2009年,總部位于河南鄭州,是一家集互聯(lián)網(wǎng)基礎(chǔ)設(shè)施及軟硬件于一體化的高新技術(shù)企業(yè),具有IDC/ISP/ICP/云牌照、雙軟等資質(zhì),并擁有多個國家版權(quán)局認證。公司自成立以來,一直致力于發(fā)展互聯(lián)網(wǎng)IDC數(shù)據(jù)中心DataCenter、云計算Cloud、大數(shù)據(jù)BigDate、人工智能AI、內(nèi)容加速CDN、互聯(lián)網(wǎng)安全、軟件定制開發(fā)等產(chǎn)品服務(wù)及行業(yè)客戶技術(shù)一體化智能解決方案;2018年成為百度智能云AI河南服務(wù)中心。
售前咨詢熱線:400-996-8756
備案提交:0371-89913068
售后客服:0371-89913000
搜索詞
熱門產(chǎn)品推薦