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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-10-12 07:30:07 | 显示全部楼层 |阅读模式
大于2T的设备使用fdisk分区已经不可以,只能使用gpt方式分区
3 B+ q' a3 ^' m7 j6 \3 e[root@localhost ~]# gdisk /dev/sdb  \8 d6 v; J4 u4 g
GPT fdisk (gdisk) version 0.8.6% J4 k2 Z9 Y$ y& p  \
Partition table scan:- B5 U4 z( C8 Y/ ]9 o
  MBR: protective
' P* L* l: G% r- i( |4 q  BSD: not present3 a6 o  Y. f3 b5 N
  APM: not present$ s4 I2 u- I7 \; l, `# }
  GPT: present
7 U5 C' d6 D" L0 O/ cFound valid GPT with protective MBR; using GPT.
- _  _9 }3 ^- b6 K( OCommand (? for help): ?
$ O, \0 v& {& a0 M* `b    back up GPT data to a file1 T. h6 N1 z+ {& _1 `* o
c    change a partition's name
# d, j' @1 Q3 @& c$ `! j8 Wd    delete a partition% I8 F+ t) d$ r( b2 S3 Y" U% K
i    show detailed information on a partition4 P) c6 [& L  @) g7 S5 k% r& [
l    list known partition types/ u( c# D- b' ?8 n
n    add a new partition
) b' Y* c- @) l" h' Do    create a new empty GUID partition table (GPT)) `( ^) j* G$ Z; c" [5 p: |  M
p    print the partition table
  c/ g4 j- B# x; R, V4 U0 Kq    quit without saving changes
* S8 S0 C4 B8 _( A* ?2 j2 }5 H6 P7 a0 sr    recovery and transformation options (experts only)- Q6 m+ V( n. F# c8 p
s    sort partitions3 t8 h6 \" H( l. U
t    change a partition's type code
+ w6 R# S* O/ Q+ c4 bv    verify disk  y" O  x, p% s% ?8 j  {" |
w    write table to disk and exit# y4 ~: R$ Z$ L) G
x    extra functionality (experts only)
4 K. ^4 u0 d, Y% h3 P7 q?    print this menu
# }/ n0 W  A5 l: j8 v! s/ L  V! y0 l/ {Command (? for help): p
0 `* ]! v; m* C; vDisk /dev/sdb: 62914560 sectors, 30.0 GiB- ?8 o6 D/ Z' V. ~
Logical sector size: 512 bytes* g2 ]# A8 w. J
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A9 x5 Q: X' @+ g+ Z1 f
Partition table holds up to 128 entries
  U3 x% l  [- CFirst usable sector is 34, last usable sector is 629145263 P2 g6 j2 a" u6 d( w
Partitions will be aligned on 2048-sector boundaries
' W; T  g3 E6 E; ]- ~& ?Total free space is 62914493 sectors (30.0 GiB)7 p+ o1 n4 P' U8 H! |- Y0 U5 b, T( B6 P
Number  Start (sector)    End (sector)  Size       Code  Name$ [& P( C& P  Y, Z
Command (? for help): n' Z3 _8 Y4 f$ ], o4 H4 c9 o# q# l: t
Partition number (1-128, default 1): 100
( I0 a% ?  P  h3 c+ K8 G4 c' @First sector (34-62914526, default = 2048) or {+-}size{KMGTP}:2 D5 P' m+ _: ]' c
Last sector (2048-62914526, default = 62914526) or {+-}size{KMGTP}: +1G          % I8 d0 L8 C* V4 n& E7 j, u
Current type is 'Linux filesystem'
7 w" H, ?* K  @/ v8 NHex code or GUID (L to show codes, Enter = 8300):9 E# |/ J) g9 A
Changed type of partition to 'Linux filesystem'
- J0 X( L: c8 `- T5 X6 A* ECommand (? for help): p& k  W2 o; \# J
Disk /dev/sdb: 62914560 sectors, 30.0 GiB
3 e: K0 f% [3 L0 m) }1 GLogical sector size: 512 bytes5 j3 p' S9 V! Z% ?1 ^- ]
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A
7 I2 g. k8 V7 V* K! K0 n$ ?3 Y0 tPartition table holds up to 128 entries5 q- o! c2 {! N
First usable sector is 34, last usable sector is 629145260 [, F# t1 I7 T$ p. [8 n0 L
Partitions will be aligned on 2048-sector boundaries& ^4 K' Q# I8 g; e. Q/ |( u
Total free space is 60817341 sectors (29.0 GiB)/ e4 o! z9 ], J
Number  Start (sector)    End (sector)  Size       Code  Name7 |4 p! {' K6 K( T" U" r  }. \' B
100            2048         2099199   1024.0 MiB  8300  Linux filesystem
0 z) V1 P$ ^& I# ]Command (? for help): w
3 f8 _* q# P* E& a! z- P. w, fFinal checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING* Z, C5 X& E1 S7 a
PARTITIONS!!7 a% T: ?3 A. E- l0 M! {* V
Do you want to proceed? (Y/N): y
- `. I4 u0 n! j  X6 o* uOK; writing new GUID partition table (GPT) to /dev/sdb.
( |; w; d- @  j* S' ?' HThe operation has completed successfully.7 |3 [4 j# a" x; H* J
[root@localhost ~]# lsblk
% m' D: l1 ^6 F/ S/ Z$ G  QNAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT2 u0 \" F' |3 t9 z! j9 r' i
sda           8:0    0   80G  0 disk/ `0 H- u  {2 q$ f1 m1 g
├─sda1        8:1    0    1G  0 part /boot9 Y4 D( L5 d5 h) v# y- G! G6 L) V, T9 o
└─sda2        8:2    0   79G  0 part
2 D$ Q, ~. R" M3 l# W  ├─cl-root 253:0    0   50G  0 lvm  /
0 z6 H  Y' x/ b, Z9 V  ├─cl-swap 253:1    0    2G  0 lvm  [SWAP]2 M1 A$ w" d8 U' {0 W! x
  └─cl-home 253:2    0   27G  0 lvm  /home
8 @7 W& q3 j! E: U- R: U4 g7 Isdb           8:16   0   30G  0 disk) ]! k  r6 h( ]2 @
└─sdb100    259:0    0    1G  0 part7 _# M- k& L7 `
sdc           8:32   0   20G  0 disk2 J' m: b3 ^- T- H
sr0          11:0    1  7.7G  0 rom  
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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