Linux中GPT分区

来源:互联网 发布:彩虹云秒赞源码 编辑:程序博客网 时间:2024/05/16 10:19
一 分区模式之MBR
1、主分区不超过4个
2、单个分区容量最大2TB
 
二 分区模式之GPT
1、主分区个数“几乎”没有限制。
在GPT的分区表中最多支持128个主分区。
2、单个分区容量“几乎”没有限制。
在GPT的分区模式中,每个分区的大小突破了MBR分区2TB限制。
75.png
 
三 实战
[root@localhost ~]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt)
alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition
table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available
devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and
END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected
device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition
NUMBER
unit UNIT set the default unit to UNIT
version display the version number and
copyright information of GNU Parted
(parted) select /dev/sdc
Using /dev/sdc
(parted) mklabel gpt
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
 
(parted) print all
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
 
Number Start End Size Type File system Flags
1 1049kB 525MB 524MB primary xfs boot
2 525MB 32.7GB 32.2GB primary xfs
3 32.7GB 54.2GB 21.5GB primary xfs
4 54.2GB 107GB 53.2GB extended
5 54.2GB 65.0GB 10.7GB logical xfs
6 65.0GB 69.2GB 4295MB logical linux-swap(v1)
7 69.2GB 107GB 38.1GB logical xfs
 
 
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
 
Number Start End Size Type File system Flags
1 1049kB 3147MB 3146MB primary
2 3147MB 6368MB 3221MB primary
3 6368MB 8590MB 2222MB extended
5 6369MB 7443MB 1074MB logical
6 7444MB 8590MB 1146MB logical
 
 
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
 
 
(parted) mkpart
Partition name? []? A
File system type? [ext2]?
Start? 0
End? 2000
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Cancel
(parted) mkpart
Partition name? []?
File system type? [ext2]?
Start? 1
End? 2000
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
1 1049kB 2000MB 1999MB
 
(parted) mkpart test 2000 3000
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
1 1049kB 2000MB 1999MB
2 2000MB 3000MB 1000MB test
 
(parted) mkpart abc 2500 3500
Warning: You requested a partition from 2500MB to 3500MB (sectors
4882812..6835937).
The closest location we can manage is 3000MB to 3500MB (sectors
5859328..6835937).
Is this still acceptable to you?
Yes/No? yes
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
1 1049kB 2000MB 1999MB
2 2000MB 3000MB 1000MB test
3 3000MB 3500MB 500MB abc
 
(parted) rm 3
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
1 1049kB 2000MB 1999MB
2 2000MB 3000MB 1000MB test
 
(parted) mkpart abc 3000 4000
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
1 1049kB 2000MB 1999MB
2 2000MB 3000MB 1000MB test
3 3000MB 4000MB 1000MB abc
 
(parted) mkpart aa 4000 5000
(parted) mkpart bb 5000 6000
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number Start End Size File system Name Flags
1 1049kB 2000MB 1999MB
2 2000MB 3000MB 1000MB test
3 3000MB 4000MB 1000MB abc
4 4000MB 5000MB 999MB aa
5 5000MB 6000MB 1000MB bb
 
(parted) unit GB
(parted) quit
Information: You may need to update /etc/fstab.
 
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 磁盘c5坏了怎么办 一体机装xp蓝屏怎么办 虚拟机密码忘记了怎么办 vivoy66手机太卡怎么办 虚拟机装xp蓝屏怎么办 exagear玩起来卡怎么办 第五人格模拟器玩太卡怎么办 速腾油箱盖打不开怎么办 奥迪a6油箱盖打不开怎么办 苹果手提虚拟机黑屏怎么办 mac系统桌面变大怎么办 删除文件要权限怎么办 页面载入错误了怎么办 手机打不开excel表格怎么办 皇室战争闪退怎么办 苹果老是闪退怎么办 黑苹果开机黑屏怎么办 MAC磁盘删了怎么办 mac磁盘被锁定怎么办 bt5读不到网卡怎么办 笔记本电脑cpu温度过高怎么办 笔记本cpu温度过高怎么办 联想系统崩溃了怎么办 办公软件用不了怎么办 win10设置闪退怎么办 手机浏览器版本低怎么办 wps界面动不了怎么办 手机设置删了怎么办 苹果手机设置不见了怎么办 笔记本电脑键盘不好使怎么办 网咖怎么办临时卡 cydia添加雷锋源失败怎么办 电脑mac已锁定怎么办 苹果home键发热怎么办 苹果软件消失了怎么办 苹果键盘消失了怎么办 苹果图标消失了怎么办 超账户授权有误怎么办 华为账号码被盗怎么办 华为无法截屏怎么办 华为账号密码忘怎么办