易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 4687|回复: 0
收起左侧

使用gdisk创建GPT 分区,分大于2T的硬盘

[复制链接]
发表于 2018-10-12 07:30:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
大于2T的设备使用fdisk分区已经不可以,只能使用gpt方式分区6 r5 T( L( a( o/ W. B- P, J% x3 K
[root@localhost ~]# gdisk /dev/sdb3 _* B8 F1 i, Y$ d7 W# W
GPT fdisk (gdisk) version 0.8.6+ B2 W* c4 [7 x
Partition table scan:
0 B, f/ k& S8 v' w' D: i2 a  MBR: protective$ T! q4 ]- t; }$ J8 {$ `
  BSD: not present
5 `. d' L% {7 }0 J  APM: not present
0 i8 M. T2 s* U1 O  GPT: present
- Y# w" B! _" ]Found valid GPT with protective MBR; using GPT.0 M: O; e1 B& P" x
Command (? for help): ?
  v$ @7 D9 x  w. jb    back up GPT data to a file: B6 s) ^' m% _! y+ ?
c    change a partition's name
( R; I5 x8 O) J2 \d    delete a partition) P- Z4 k" i) t1 F
i    show detailed information on a partition: @5 `  J2 B, x
l    list known partition types
$ l1 D' Z/ f- Q( ~n    add a new partition
: q/ }# x+ ]( ^  ho    create a new empty GUID partition table (GPT)6 n3 q. K7 W; z
p    print the partition table
, H! z1 O' ^3 z' J) i  pq    quit without saving changes
" Z3 _) ?% ?) r% d! s2 _r    recovery and transformation options (experts only)2 c* m! E  h: o& V3 p
s    sort partitions
$ C6 H2 w$ L, h! a2 ~1 k: U7 G; et    change a partition's type code
! Z+ Z' J+ d$ c3 R( Jv    verify disk
: ^! z0 t  _! d: C( q- U5 v# Iw    write table to disk and exit* R* p; H+ z1 t! [% [* x  O
x    extra functionality (experts only); b& o: o' u* B9 W8 m+ v% c  |
?    print this menu* J0 ]( }$ S1 m# p
Command (? for help): p$ S5 \* \1 G& d3 B
Disk /dev/sdb: 62914560 sectors, 30.0 GiB7 B" n9 Y/ S# t8 h4 q; t# w) j
Logical sector size: 512 bytes( S5 w# A! ]# ^( I
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A
' I3 ^7 I9 z( z0 {+ ]/ `  @5 |3 o. _Partition table holds up to 128 entries; Z" [$ m# P) v' p- l
First usable sector is 34, last usable sector is 62914526
, U1 [/ g9 x6 ^Partitions will be aligned on 2048-sector boundaries
1 T: q& \, ]% x$ z- V' H- w8 vTotal free space is 62914493 sectors (30.0 GiB)
" z  @+ m4 [) L6 L3 @Number  Start (sector)    End (sector)  Size       Code  Name
- s# B3 J) {" f- r5 x4 zCommand (? for help): n, p5 |- f1 V- Z8 K$ P' V
Partition number (1-128, default 1): 100
# u, P# J  S# e. G6 H. kFirst sector (34-62914526, default = 2048) or {+-}size{KMGTP}:
7 w2 K- R, X5 K: R0 f6 lLast sector (2048-62914526, default = 62914526) or {+-}size{KMGTP}: +1G         
" e8 y3 l7 q2 i; W  Y1 [Current type is 'Linux filesystem'
* s- h* l: {: r" g* N! _. Q) oHex code or GUID (L to show codes, Enter = 8300):
$ H- `/ ?. p5 G$ a) d1 a& fChanged type of partition to 'Linux filesystem'
. L' V- t! ], A" D% w% gCommand (? for help): p
. x# A" w2 x. W) U' y4 X# L! VDisk /dev/sdb: 62914560 sectors, 30.0 GiB3 _4 H8 g2 ]% `# d, d+ S
Logical sector size: 512 bytes. n/ ?3 |1 j% d0 m5 \( ?* }
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A: a# [0 m, o, z( H7 @
Partition table holds up to 128 entries% L" {3 w2 N) n* ^* e% N1 l+ W
First usable sector is 34, last usable sector is 62914526
' ~1 \' |3 u) Q( yPartitions will be aligned on 2048-sector boundaries/ I! F* k! t* G9 T2 q3 R4 O
Total free space is 60817341 sectors (29.0 GiB)% `  ~& m3 ]9 w: `7 f8 I% P
Number  Start (sector)    End (sector)  Size       Code  Name+ A2 y( q6 l1 A! K
100            2048         2099199   1024.0 MiB  8300  Linux filesystem/ D, ~( O5 U. ?' T$ V$ `
Command (? for help): w, P+ x: H* c* ~8 Y
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
* N  i" B% m+ {' V+ `PARTITIONS!!1 \6 V6 }" E! x' G1 d
Do you want to proceed? (Y/N): y! Y3 ~9 ]) q! h" O/ S
OK; writing new GUID partition table (GPT) to /dev/sdb.. @/ Z( m* c! D( j! u* G4 {3 b2 n
The operation has completed successfully.$ k  j% G$ N6 {7 j
[root@localhost ~]# lsblk
" X# l, Q9 V& R4 J+ ?NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT4 \# H1 q9 `/ ?1 z
sda           8:0    0   80G  0 disk0 n& H9 r! i4 L- n( E6 G. D& c
├─sda1        8:1    0    1G  0 part /boot
4 I7 C& i- ~7 w& Z& G└─sda2        8:2    0   79G  0 part2 _" B8 F. \# J& A2 b: U6 G
  ├─cl-root 253:0    0   50G  0 lvm  /: x) t% X) G6 t6 z; x
  ├─cl-swap 253:1    0    2G  0 lvm  [SWAP]
# y) }$ {  W0 ?+ x. q* {, V$ D  └─cl-home 253:2    0   27G  0 lvm  /home: u+ S) i7 E  P" G( s) }
sdb           8:16   0   30G  0 disk
( H1 K5 K: ~* N5 L3 @└─sdb100    259:0    0    1G  0 part
# y8 }; v- C% c( \8 \sdc           8:32   0   20G  0 disk
7 m. f+ B5 S) d+ i& u/ e& _sr0          11:0    1  7.7G  0 rom  
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:41 , Processed in 0.058368 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表