- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
大于2T的设备使用fdisk分区已经不可以,只能使用gpt方式分区
% b. _8 J2 b+ q) X[root@localhost ~]# gdisk /dev/sdb
7 j% t) |- W) I! N) t/ i8 k w6 uGPT fdisk (gdisk) version 0.8.6$ M1 `. B0 p& G) e
Partition table scan:; c3 Q" v: i- E" |. c2 J' |! j
MBR: protective1 ^' V1 R/ {0 X/ ]
BSD: not present* }6 B5 z/ ?$ n5 y8 |5 P" S6 B
APM: not present% q3 K2 g5 L- x7 n. r6 x
GPT: present
! ~5 |4 N+ |, q% f# `Found valid GPT with protective MBR; using GPT.
* A* k: F+ N" P x5 ?% QCommand (? for help): ?4 i( z+ A8 V7 N, c; V) @6 ?
b back up GPT data to a file2 m* q$ a# D! t, H3 S, _9 N
c change a partition's name
9 _! L7 t0 {" H( V# Md delete a partition9 h+ V! }8 p, h3 b+ o0 g
i show detailed information on a partition' h, b8 [, g: V- y" F* N# r
l list known partition types
. p! k: U8 L* g. S4 R/ x( Ln add a new partition
5 R% [ `9 v) L5 x+ y" ^# fo create a new empty GUID partition table (GPT)
+ k) }% M4 o+ W2 J, t( Ip print the partition table
3 Y: T7 v2 X. R6 c# a: s4 V( Lq quit without saving changes
; m0 ]0 U" \- l3 `: o& k. Gr recovery and transformation options (experts only)
, \' Q% {* d: }s sort partitions: p8 M+ i: o" V+ ]* i4 t" {
t change a partition's type code
; Y, W5 ~8 }- r: z" g# J; Kv verify disk
7 j( Y# U* \- B. dw write table to disk and exit
5 G; ^* [2 d& h+ a) C7 Qx extra functionality (experts only)/ t$ v" q$ A6 ~' l* s0 `
? print this menu$ U1 \* r- V) {/ D3 `& F& u. w- c
Command (? for help): p4 O# k3 m. d- v! Y
Disk /dev/sdb: 62914560 sectors, 30.0 GiB
, d" q9 q% v C( QLogical sector size: 512 bytes
/ v* K) i0 B6 N9 a( u3 n% L. sDisk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A
3 h1 e, i% S2 V5 Q( m1 ~* WPartition table holds up to 128 entries$ { f3 `2 g) r( s
First usable sector is 34, last usable sector is 62914526
. D7 [( K# o& A% \, rPartitions will be aligned on 2048-sector boundaries6 q6 R H7 A2 F$ c6 o
Total free space is 62914493 sectors (30.0 GiB)1 f1 g, Q* x! W6 [
Number Start (sector) End (sector) Size Code Name
9 r5 u5 o7 h5 P( w8 sCommand (? for help): n( a: G+ _# }; c5 V. E8 t
Partition number (1-128, default 1): 1004 K. e5 |. ?/ t3 Q, f1 W
First sector (34-62914526, default = 2048) or {+-}size{KMGTP}:
. G& x0 d3 ?5 W. ]Last sector (2048-62914526, default = 62914526) or {+-}size{KMGTP}: +1G
+ T P: { q& A4 w. M5 cCurrent type is 'Linux filesystem'
! A9 H' z0 T+ V1 }0 g# B1 yHex code or GUID (L to show codes, Enter = 8300):
3 q/ m$ b' {0 U# g2 R4 HChanged type of partition to 'Linux filesystem'0 a; v# c8 C: o: U
Command (? for help): p
) E# F( d2 l" Z9 ^. J+ S/ vDisk /dev/sdb: 62914560 sectors, 30.0 GiB4 r! b8 b2 C) j" S) g, E/ g8 c
Logical sector size: 512 bytes8 Y5 w3 x' I9 h# S
Disk identifier (GUID): 0C46C34F-DB4A-4E3A-8D8B-EE2D49F2027A1 L' n9 C# Y; H9 e% V
Partition table holds up to 128 entries, ]% A% g `1 o2 x, g5 K8 ]
First usable sector is 34, last usable sector is 62914526
, \$ W0 I H5 ~ C! [4 hPartitions will be aligned on 2048-sector boundaries
8 K! m" S9 [9 Y2 [1 cTotal free space is 60817341 sectors (29.0 GiB)
" j5 i; _- y5 X+ H: ^; o1 L. F$ t$ s" PNumber Start (sector) End (sector) Size Code Name4 I3 U6 u" t: O8 R
100 2048 2099199 1024.0 MiB 8300 Linux filesystem- s& s% d; B3 o
Command (? for help): w& s& l# j7 _, i9 ~6 l/ Z7 c
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
5 O4 U3 S7 D( f# T5 q" ]! K+ _PARTITIONS!!0 d4 F0 Y0 S* n
Do you want to proceed? (Y/N): y
( s4 N3 A: `. m" `& ]OK; writing new GUID partition table (GPT) to /dev/sdb.
7 H& z3 u& Y0 ^8 {* SThe operation has completed successfully.- Q% Q2 i A, c: u9 D+ p
[root@localhost ~]# lsblk! B6 T/ `9 m/ k$ c2 T* l
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
" J. W5 P# L8 i1 Lsda 8:0 0 80G 0 disk
* ^( K% [0 `- a2 S* V J├─sda1 8:1 0 1G 0 part /boot
6 W% w* W' ]# W└─sda2 8:2 0 79G 0 part$ K2 ]& Z% h3 W* W+ t
├─cl-root 253:0 0 50G 0 lvm /: W' r2 A) p" u! S* r! _
├─cl-swap 253:1 0 2G 0 lvm [SWAP]' t' Z- b5 X& s; l
└─cl-home 253:2 0 27G 0 lvm /home2 K% u1 { e. K( o( }
sdb 8:16 0 30G 0 disk& {" t9 Y. ]( s: J) W
└─sdb100 259:0 0 1G 0 part9 ^: c# A8 m0 u5 S) \# H
sdc 8:32 0 20G 0 disk
5 K4 }$ ^9 R3 h* ^! ?4 hsr0 11:0 1 7.7G 0 rom |
|