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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-10-12 07:30:07 | 显示全部楼层 |阅读模式
大于2T的设备使用fdisk分区已经不可以,只能使用gpt方式分区
7 V' J4 {: H; D' w[root@localhost ~]# gdisk /dev/sdb4 u. j5 y) g  c- Y& w# u- T% F
GPT fdisk (gdisk) version 0.8.6
9 {- Z9 O: _0 z6 Z3 K' J# {Partition table scan:
' `7 b, s! A( n8 M9 ~* N& s$ t; ^9 f8 P  MBR: protective1 G, ~) v& R  T2 ^/ x  t
  BSD: not present; v2 z* ?7 \$ g* X4 m
  APM: not present* r, u2 H9 d% q/ i) ^. l4 y9 _$ V
  GPT: present
( b2 Z2 E; J2 |4 SFound valid GPT with protective MBR; using GPT.4 V' @- u! M3 i9 y  N. d
Command (? for help): ?) q+ i; r8 t( u1 y7 Z
b    back up GPT data to a file. V  D$ r# z: \
c    change a partition's name0 k8 M$ A' x0 Y6 V  @/ @
d    delete a partition' V1 S5 a: ~0 ?! L0 ?2 O
i    show detailed information on a partition
/ ~" y; }& ?6 D8 Nl    list known partition types
" ~2 ?6 V+ l8 l0 rn    add a new partition
1 p6 p) m& S9 H: O, B9 lo    create a new empty GUID partition table (GPT)( j, L  k! R: W# L# @) ^7 I
p    print the partition table* h3 b( L- W2 ~/ u
q    quit without saving changes1 S  e; O8 I) ~
r    recovery and transformation options (experts only)
2 @/ T! \5 v9 A" r. o4 i' h$ |s    sort partitions
4 i5 d# _4 o8 d# Mt    change a partition's type code
# h1 e- A9 v& W. Av    verify disk1 F7 D  _, s5 F3 y
w    write table to disk and exit9 c7 u8 {" F- E
x    extra functionality (experts only)
: X) a! e4 w9 m1 l: i/ n?    print this menu
: m) _* O2 r% S8 `2 U: _Command (? for help): p2 k3 K: f: i! N- m; `1 b
Disk /dev/sdb: 62914560 sectors, 30.0 GiB
2 |0 M7 B: Z) s7 Q4 r4 OLogical sector size: 512 bytes! @" K5 n7 ~; Y/ U
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A  a  `$ S  c8 p& ?0 s7 N5 |* R
Partition table holds up to 128 entries! [  Z: T8 F' J5 @: Z5 @1 a
First usable sector is 34, last usable sector is 62914526. `; h; |9 L4 _7 l
Partitions will be aligned on 2048-sector boundaries
6 Q- v+ q! ]' c& B9 B5 |; mTotal free space is 62914493 sectors (30.0 GiB)9 X* {% Z: r1 A
Number  Start (sector)    End (sector)  Size       Code  Name1 p  i+ ~* q+ B, i. p& g3 s' x
Command (? for help): n
6 j6 r" x) R: I: D1 CPartition number (1-128, default 1): 100
' q) E- E) ^  l9 G" L+ v' y& o3 e5 jFirst sector (34-62914526, default = 2048) or {+-}size{KMGTP}:
" N$ r# H$ g# Z0 B* }1 G: XLast sector (2048-62914526, default = 62914526) or {+-}size{KMGTP}: +1G          & `8 n* u) |0 w1 `- b
Current type is 'Linux filesystem'
. o' X. }* @" {4 DHex code or GUID (L to show codes, Enter = 8300):: w$ j6 I& P7 d; }* I- t
Changed type of partition to 'Linux filesystem'+ S: H6 s: M6 F6 b% i7 `% B
Command (? for help): p
( J' d! I: s! q1 X8 FDisk /dev/sdb: 62914560 sectors, 30.0 GiB
8 D4 c8 Y+ A9 W; fLogical sector size: 512 bytes
' Y+ }( d; n% E& n! K# q' DDisk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A
7 s' w4 m9 S9 Q8 v0 U7 PPartition table holds up to 128 entries9 O( q7 L& w1 C' a
First usable sector is 34, last usable sector is 62914526: [4 z' m: v, d% m( U
Partitions will be aligned on 2048-sector boundaries
$ f% x5 h8 U, p0 k  @( lTotal free space is 60817341 sectors (29.0 GiB)
' m* v6 S, U. Z! k2 g9 o! ?Number  Start (sector)    End (sector)  Size       Code  Name
$ l7 p: ]! c6 a1 ]$ { 100            2048         2099199   1024.0 MiB  8300  Linux filesystem" b7 S8 k5 B& N8 c
Command (? for help): w
5 Z; ]5 S+ @  ?% g" @/ tFinal checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
4 @0 v' {! }8 j8 }9 q# PPARTITIONS!!+ k' @5 u3 W+ x& h' a! F
Do you want to proceed? (Y/N): y
$ r7 ]8 c, W# k" L- T; N" i2 [3 UOK; writing new GUID partition table (GPT) to /dev/sdb./ P0 ]# t$ k  V
The operation has completed successfully.5 {" f" M6 M. K; x
[root@localhost ~]# lsblk
4 f) S+ Q. j9 v6 ~NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT2 M, W! y  |  r+ q: `
sda           8:0    0   80G  0 disk! Z2 F% U" t' E- t' u9 k
├─sda1        8:1    0    1G  0 part /boot" x  V6 g+ E- i* E3 W
└─sda2        8:2    0   79G  0 part& e9 O* e( R7 V/ o# q3 H* |3 @
  ├─cl-root 253:0    0   50G  0 lvm  /
6 D- W1 j. Z2 v1 ~4 {( z% F( u  ├─cl-swap 253:1    0    2G  0 lvm  [SWAP]4 K4 |6 _8 t; L
  └─cl-home 253:2    0   27G  0 lvm  /home
# b' M9 }# `6 ?sdb           8:16   0   30G  0 disk
4 @1 C. D1 ~6 Q) }7 e└─sdb100    259:0    0    1G  0 part
' Y2 ]. X4 w! `; Nsdc           8:32   0   20G  0 disk
3 N5 B. l, R- t# m2 U% w" I# i2 `sr0          11:0    1  7.7G  0 rom  
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 04:41 , Processed in 0.039162 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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