找回密码
 注册
查看: 4689|回复: 0

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-10-12 07:30:07 | 显示全部楼层 |阅读模式
大于2T的设备使用fdisk分区已经不可以,只能使用gpt方式分区: g5 O" c7 J1 }2 r  h8 X
[root@localhost ~]# gdisk /dev/sdb% J( Z" X1 }# P' K% k
GPT fdisk (gdisk) version 0.8.6
- f9 Y. B* R# _1 L/ s% ?Partition table scan:3 r3 P' w* t: n2 e/ k0 x5 J. H
  MBR: protective1 }% ]5 W- g, V2 Q
  BSD: not present
. \4 O* h8 z* B' z  z  APM: not present
* o& P5 }: f* O' i* {# z  GPT: present
" e: s- c( B% e) d' c$ \Found valid GPT with protective MBR; using GPT.
0 n. N3 e! k2 M, X, r: q9 GCommand (? for help): ?
+ n* M5 i" U; ]b    back up GPT data to a file
0 g/ e+ U$ P& H( K/ Lc    change a partition's name3 ]! n) l: T, e2 v) W
d    delete a partition
1 h$ H3 q& k* e0 c( T& h+ Ti    show detailed information on a partition3 p% M+ ]9 t9 ^- x* Z7 b
l    list known partition types! x. R* ?( @1 v6 O6 I
n    add a new partition0 c+ W' y6 |! k! A
o    create a new empty GUID partition table (GPT)) m& c5 f8 ~9 |* C: {* v8 h
p    print the partition table
+ P1 v5 I1 \, O5 U7 i* r) Tq    quit without saving changes, s. s) U4 W$ ?% P! v9 v/ [1 O% R
r    recovery and transformation options (experts only): @! u4 D) M2 G0 x; w6 v! x; G
s    sort partitions
2 i; w, t1 a" G* ft    change a partition's type code; D, e# @  Y# C' s, ~: C
v    verify disk( [- {" k& x1 _6 L) ]
w    write table to disk and exit2 C2 S( @- n3 T; ]: ?3 j* K" F/ T( k
x    extra functionality (experts only)
# s" p$ {/ ~+ B$ x) p?    print this menu. @2 s. o1 K5 v9 ^. G
Command (? for help): p. M' R  _/ s+ V2 e
Disk /dev/sdb: 62914560 sectors, 30.0 GiB( i! k' ]. S& t( |4 h& w) s
Logical sector size: 512 bytes
3 S( g5 I& e3 [8 s! b& ^/ A# nDisk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A
6 w% s8 U3 Z* b' b2 u. a, }Partition table holds up to 128 entries( ^6 {7 [( W  Y9 D3 w5 n7 }
First usable sector is 34, last usable sector is 62914526+ ?) W6 W9 X$ E- ~4 Q
Partitions will be aligned on 2048-sector boundaries
" E+ V5 v4 z+ b( Y5 ?1 D- w7 RTotal free space is 62914493 sectors (30.0 GiB)% O% _% A  y) k5 i$ E
Number  Start (sector)    End (sector)  Size       Code  Name$ [+ X, s" e; Y  e, b3 k
Command (? for help): n: M; r4 N2 L* V$ T5 f
Partition number (1-128, default 1): 100
! N- q- P8 z2 MFirst sector (34-62914526, default = 2048) or {+-}size{KMGTP}:
9 T7 l# V) E$ |/ a% _Last sector (2048-62914526, default = 62914526) or {+-}size{KMGTP}: +1G         
* K# X0 H* T! g! C9 M& pCurrent type is 'Linux filesystem'8 U' [# F2 w! L
Hex code or GUID (L to show codes, Enter = 8300):- w2 v" J6 |! u
Changed type of partition to 'Linux filesystem'
, }1 Q' r7 g% }Command (? for help): p  u8 n, S  g# q  J  P) X( P
Disk /dev/sdb: 62914560 sectors, 30.0 GiB, q! Q  x  ?. I! V* J
Logical sector size: 512 bytes" A2 c3 Y$ Q8 v4 i3 O
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A
/ D% C6 n6 g2 O2 q! IPartition table holds up to 128 entries3 ^- [! ]0 N9 D' D
First usable sector is 34, last usable sector is 62914526
7 o0 e0 P; s8 z3 ^( `. m; HPartitions will be aligned on 2048-sector boundaries; G2 @1 T* w% e+ o& R3 t1 D& M
Total free space is 60817341 sectors (29.0 GiB)! n" I$ ^1 t! N6 i1 R# l2 M) s- n
Number  Start (sector)    End (sector)  Size       Code  Name& P$ D& K! f- i' e9 V3 q
100            2048         2099199   1024.0 MiB  8300  Linux filesystem
# d/ Q" J/ E, D/ E- D0 NCommand (? for help): w
0 k9 @! f6 t% }Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
/ C9 ?$ ~1 d, A2 j3 k; O4 N) wPARTITIONS!!' a) }/ F0 R1 Z( q& |0 M
Do you want to proceed? (Y/N): y( [  }2 z. G/ t, M9 w/ X& r
OK; writing new GUID partition table (GPT) to /dev/sdb.
. z% X, Y9 ]1 {The operation has completed successfully.2 e$ q* U8 m+ f) h
[root@localhost ~]# lsblk" C" J% S7 X( _
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT! Q6 @5 H8 D) G: g' T* [# t
sda           8:0    0   80G  0 disk5 _+ u8 U( O/ s  {* W
├─sda1        8:1    0    1G  0 part /boot: W% v: U4 Z8 x) B
└─sda2        8:2    0   79G  0 part1 r/ ^) [  ?7 N4 I* J: w+ ^* E! J0 y$ A
  ├─cl-root 253:0    0   50G  0 lvm  /9 G9 H7 F- H: O' d8 y3 I
  ├─cl-swap 253:1    0    2G  0 lvm  [SWAP]9 \/ i/ o% Z( E& g" Z$ Z/ D: z+ b
  └─cl-home 253:2    0   27G  0 lvm  /home
) C/ x: E/ f2 wsdb           8:16   0   30G  0 disk
4 U- t" {; ?2 {0 W+ H2 ^└─sdb100    259:0    0    1G  0 part) ]4 T& T1 p( I5 n3 H: ^
sdc           8:32   0   20G  0 disk
& n# K, ~2 Z4 k( G3 K- @& msr0          11:0    1  7.7G  0 rom  
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 04:34 , Processed in 0.014023 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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