免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Linux下使用parted命令分區(qū)大于2T的GPT的磁盤
我們來看一下兩種分區(qū)表
MBR分區(qū)表:(MBR含義:主引導(dǎo)記錄)
所支持的最大卷:2T (T; terabytes,1TB=1024GB)
對分區(qū)的設(shè)限:最多4個主分區(qū)或3個主分區(qū)加一個擴(kuò)展分區(qū)(擴(kuò)展分區(qū)中支持無限制的邏輯驅(qū)動器)

GPT分區(qū)表:(GPT含義:GUID分區(qū)表)
支持最大卷:18EB,(E:exabytes,1EB=1024TB)
每個磁盤最多支持128個分區(qū)

假設(shè)要用parted對/dev/sdb(大小為6000G)進(jìn)行分區(qū)操作:

1、進(jìn)入系統(tǒng)執(zhí)行:
#parted /dev/sdb

2、建立磁盤label:

mklabel GPT

3、按p鍵,查看磁盤可用空間,顯示單位為M。6000G應(yīng)該顯示大致

為: /dev/sdb 的磁盤幾何結(jié)構(gòu):0.000-6000000.000 兆字節(jié)

4、創(chuàng)建分區(qū):
在(parted)后輸入:
mkpart并按照提示操作

分區(qū)類型? primary/主分區(qū)/extended/擴(kuò)展分區(qū)? p (如果要創(chuàng)建擴(kuò)展分區(qū) 此處
輸入e)
文件系統(tǒng)類型? [ext2]? (這里直接回車,分區(qū)創(chuàng)建完畢后通過mkfs.ext3
/dev/sdb*建立文件系統(tǒng))
起始點(diǎn)?0
結(jié)束點(diǎn)?-1

5、按p鍵查看剛創(chuàng)建的分區(qū)是否已經(jīng)成功。

6、如果成功,鍵入quit退出parted。

7、使用mkfs.ext3 /dev/sdb1 來創(chuàng)建文件系統(tǒng)

 
fdisk命令雖然很交互,操作也方便,但是對于大于2T的磁盤無法操作,如果我們想用大于2T的磁盤怎么辦?可以把磁盤轉(zhuǎn)化為GPT格式。
 

GPT格式的磁盤相當(dāng)于原來MBR磁盤中原來保留4個partition table的4*16個字節(jié)只留第一個16個字節(jié),類似于擴(kuò)展分區(qū),真正的partition table在512字節(jié)之后,GPT磁盤沒有四個主分區(qū)的限制。


但fdisk不支持GPT,我們可以使用parted來對GPT磁盤操作。

parted功能很強(qiáng)大,既可用命令行也可以用于交互式


在提示符下輸入parted就會進(jìn)入交互式模式,如果有多個磁盤的話,我們需要運(yùn)行select sdx x為磁盤,來進(jìn)行磁盤的選擇

parted>

parted>select sdb                假設(shè)磁盤為sdb

parted>mklable gpt               將MBR磁盤格式化為GPT

parted>mklable msdos             將GPT磁盤轉(zhuǎn)化為MBR磁盤

parted>mkpart primary 0 100      劃分一個起始位置為0大小為100M的主分區(qū)

parted>mkpart primary 100 200    劃分一個起始位置為100M大小為100M的主分區(qū)

parted>print                     打印當(dāng)前分區(qū)

 

在parted里邊不支持ext3的文件系統(tǒng),所以如果要使用的話,要退出parted進(jìn)行格式話

mkfs.ext3 /dev/sdx1

因?yàn)閒disk是不支持GPT磁盤,所以不要使用fdisk -l來查看X磁盤剛才分好的區(qū),看不到的。


命令行的模式:
將硬盤轉(zhuǎn)化為GPT磁盤后,執(zhí)行下列命令

parted /dev/sdx mkpart primary 0 100   劃分一個起始位置為0大小為100M的主分區(qū)

Acronym for GUID Partition Table

GPT was introduced for iA64 systems, to get around a fixed 32 bit issue (2 to the power of 32 is 4 billion times a 512 byte block equals 2 Terabytes) in the PC-BIOS Partition table. Partitions larger than 2 TB require using a GPT disklabel, which differs from the PC-BIOS Partition table in a number of ways:

    * Is easily extensible.
    * Can contain up to 128 primary partitions, as opposed to 4, so there's no need for extended partitions.
    * Allows Partitions larger than 2 TB.
    * Identifies Partitions with a GUID so you can reference that Partition even if disks are moved around.
    * Identifies Partition type with a GUID, thus avoiding the type conflicts that plague the PC-BIOS Partition table format.
    * Provides a 46(?) character UTF-16 partition label to identify Partitions.
    * Has a "fake" MBR for backwards compatibility.
    * Includes a CRC32 to detect corrupt Partition tables.
    * Stores a backup Partition table at the end of the disk.

Most partitioning tools under Linux will fail to do anything sensible with a > 2 TB Partition. As of this writing, parted(8) is the only one that understands them and will let you set the GPT label on the disk.

There is a lot of information stating that you cannot boot off a GPT enabled device. Most of the claims imply that the fault is with LILO or GRUB not understanding GPT devices. We've not tested this, but GPT and traditional MBRs will coexist.

See also:

    * Disk Sectors on GPT Disks from the MS Knowledge Base

所以在超過2TB時,我不能使用交互很好的Fdisk命令,只能磁盤轉(zhuǎn)化為GPT格式。由于GPT格式的磁盤相當(dāng)于原來MBR磁盤中原來保留4個 partition table的4*16個字節(jié)只留第一個16個字節(jié),其它的類似于擴(kuò)展分區(qū),真正的partition table在512字節(jié)之后,所以對GPT磁盤表來講沒有四個主分區(qū)的限制。

對GPT磁盤分區(qū)表進(jìn)行操作,我們要使用parted命令。其實(shí)parted功能很強(qiáng)大,它可以象fdisk一樣既可用命令行也可以用于交互式.
下面我們就來實(shí)際操作吧,在提示符下輸入parted就會進(jìn)入交互式模式

#  parted  /dev/sdb
GNU  Parted  1.8.1
Using  /dev/sdb
Welcome  to  GNU  Parted!  Type  'help'  to  view  a  list  of  commands.

(parted) mklabel gpt
將MBR磁盤格式化為GPT

(parted) mkpart primary 0 100
劃分一個起始位置為0大小為100M的主分區(qū)

(parted) mkpart primary 100 200
劃分一個起始位置為100M大小為100M的主分區(qū)

(parted)  mkpart  primary  0  -1

劃分所有空間到一個分區(qū)

(parted)  print
打印當(dāng)前分區(qū)

(parted)  quit

可能還會用到的一些命令

(parted) mklable msdos
如果要反過來.將GPT磁盤轉(zhuǎn)化為MBR磁盤

在這樣分完分區(qū)后,還要使用mkfs.ext3來進(jìn)行格式化
#partprobe
#mkfs.ext3 -F /dev/sdb1

記的哦,因?yàn)閒disk是不支持GPT磁盤,所以使用fdisk -l來查看磁盤剛才的分區(qū)是沒有用的.

命令行的模式:

將硬盤轉(zhuǎn)化為GPT磁盤后,執(zhí)行下列命令

parted /dev/sdx mkpart primary 0 100 
##劃分一個起始位置為0大小為100M的主分區(qū)
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
大硬盤(大于2T)分區(qū)方法
自建NAS如何使用大于2TB的硬盤(從分區(qū)開始)
Linux 創(chuàng)建大于2T的分區(qū)
linux大于2T的磁盤使用GPT分區(qū)方式
linux大于2T的磁盤使用GPT分區(qū)方式 | 稀飯的國度
linux文件系統(tǒng)及磁盤格式化
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服