|
|
[root@cusc_fortress ~]# lsblk
" B9 o( v S$ k" {$ _2 c8 S( nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT; O: h4 V! Q- X
vda 252:0 0 50G 0 disk
" ?$ D# O2 w3 j├─vda1 252:1 0 1G 0 part /boot
$ d2 u1 J2 F2 }- x; t$ p& x└─vda2 252:2 0 49G 0 part 5 A3 `" M1 }0 K
├─centos-root 253:0 0 147G 0 lvm /) \( n7 M0 |0 M3 m) S& u8 O6 B' `2 |
└─centos-swap 253:1 0 2G 0 lvm [SWAP]; G1 u0 I! o$ F0 n4 J
vdb 252:16 0 100G 0 disk : B7 |! y7 D' Q* f/ D! h. t/ {/ P
└─vdb1 252:17 0 100G 0 part 6 k' ?- y4 w9 e; C( }
└─centos-root 253:0 0 147G 0 lvm /
" W+ |; K7 ]' L! Xvdc 252:32 0 3T 0 disk 7 ~8 Q* u; ~5 \6 [1 X
└─vdc1 252:33 0 2T 0 part /test' d. b6 p0 q# H+ W9 U
[root@cusc_fortress ~]# growpart -v /dev/vdc 334 F. R' O5 O$ F* U
update-partition set to true! J' t+ Z1 M' I$ v- A3 O
no tools available to resize disk with 'gpt'+ R8 F8 C( y, c) _+ L6 F
FAILED: failed to get a resizer for id '') J( h! ^/ L" i- V( S% T
[root@cusc_fortress ~]# growpart -v /dev/vdc ^C- |5 B4 H" X; Y H9 s
[root@cusc_fortress ~]# yum install gdisk -y8 m: }" p' P% t0 w. H; f& d$ G9 M( r7 o* N
Loaded plugins: fastestmirror, langpacks
4 L5 `; Z1 X2 rLoading mirror speeds from cached hostfile
6 a% ?. M& h! @) C * base: mirrors.huaweicloud.com
6 h0 k' ^- c4 ~2 i. j p * extras: mirrors.bupt.edu.cn" ]0 M) D9 \) D
* updates: mirrors.bupt.edu.cn
6 ?3 h6 L, M* O- O+ x8 r! tResolving Dependencies
$ p& K. L1 M3 ~+ ~& l& H--> Running transaction check2 b. F: z7 I/ i& P
---> Package gdisk.x86_64 0:0.8.10-3.el7 will be installed
4 E, F J T, \' ~# q% x--> Finished Dependency Resolution4 Q n( Q* m0 _5 w
& V% q* |& o1 Z) T8 a
Dependencies Resolved% p) J0 A; e! ^- {, `8 v3 K6 l
$ j8 H% o: q/ B" S2 P: L. Y, m3 l* V+ h
=================================================================================================================================================================================================================. _# q- D% N0 i0 J
Package Arch Version Repository Size
8 k- x( k: u% o6 X=================================================================================================================================================================================================================
, q5 D7 e% q# g; RInstalling:& Q$ O3 P; A( _
gdisk x86_64 0.8.10-3.el7 base 190 k) O/ k9 n" i$ ^
7 w, l' B m# d/ M9 W/ t# D5 kTransaction Summary, P6 T. U) `: Q# Q0 g5 h
=================================================================================================================================================================================================================
7 C2 c' k% ]7 m7 EInstall 1 Package
: a% W' |" U0 y) P) ]& V% H6 h8 k2 F5 {/ }: M' C$ t
Total download size: 190 k
( D- Z; g, C% d" cInstalled size: 660 k
+ c: K0 E; |. N$ a8 w# N- Q, uDownloading packages:
% M ?; \' c" N( A- I3 kgdisk-0.8.10-3.el7.x86_64.rpm | 190 kB 00:00:00 8 e: H: g! o7 }' A; h! f
Running transaction check
' c3 ?. {7 k5 x0 E, v5 q. q$ zRunning transaction test, w. n/ E0 O4 @ m5 [- ~6 i9 q: q
Transaction test succeeded
' z& y/ m1 b) F; J+ ^7 v2 RRunning transaction
" ]/ S5 ^ B% X g- Y' C Installing : gdisk-0.8.10-3.el7.x86_64 1/1 ) O. X+ {' J M A
Verifying : gdisk-0.8.10-3.el7.x86_64 1/1 " x: z s& |% D0 ~7 T; B0 z; ?
1 q' o5 q6 c8 I9 x9 T+ U& {; C/ TInstalled:
6 A9 E- m! g M1 q3 x; R; } gdisk.x86_64 0:0.8.10-3.el7 % l* Q) G2 o: T& Q6 C; x9 R8 |
! b B1 o1 H8 `/ J+ N: PComplete!
4 o) _3 s7 ^5 _[root@cusc_fortress ~]# growpart -v /dev/vdc 33
. o5 \) P" F. h; t# G# _: Wupdate-partition set to true, x5 v b' c% E! Z. x! w
resizing 33 on /dev/vdc using resize_sgdisk_gpt; h" w0 U, |/ i6 M% v
disk=/dev/vdc partition=33: original sgdisk info:
- b* D" P8 z' ^4 l# GPartition #33 does not exist.
+ ~) z2 X0 i+ h6 tDisk /dev/vdc: 6442450944 sectors, 3.0 TiB
* ]- w0 [- g! i! `4 T% K9 aLogical sector size: 512 bytes4 K0 ~# n4 K: e, s M4 N$ P: \
Disk identifier (GUID): 20ED977B-30A0-4F51-AFCC-E54A8B2A5B90
* S, X8 R7 P$ B6 pPartition table holds up to 128 entries6 j+ p. s! Q+ h! X d" c4 T
First usable sector is 34, last usable sector is 4294967262) j0 C, D' C" S4 V! M
Partitions will be aligned on 8-sector boundaries
# q* n4 }. \5 r" t. ~. E2 j q7 STotal free space is 1919 sectors (959.5 KiB) h: W4 O; f7 {: o! T+ J
* d# k; C4 d$ _) [: n# x2 iNumber Start (sector) End (sector) Size Code Name! }6 E2 Z, g! c* p' s
1 34 4294965343 2.0 TiB 0700 09 Q' _7 u& c7 }$ p& m
disk=/dev/vdc partition=33: pretend sgdisk info D3 }/ m0 J7 @" D. R% l
Disk /dev/vdc: 6442450944 sectors, 3.0 TiB
; @4 ^( `( `5 _ H0 b/ NLogical sector size: 512 bytes6 B% {2 ]& P. I- l9 E* a
Disk identifier (GUID): 20ED977B-30A0-4F51-AFCC-E54A8B2A5B90
! |9 g* I( i1 a( \+ P/ P: [* hPartition table holds up to 128 entries
& b. S1 l. w- b; n' |) HFirst usable sector is 34, last usable sector is 6442450910$ {6 `1 g% l% u. b0 g
Partitions will be aligned on 8-sector boundaries
, @ l+ b6 b7 h' f, z' l; JTotal free space is 2147485567 sectors (1.0 TiB)
a" Y4 U! j% P! d, ?) a+ ~" X% L
: p, b, u% V: e, Z' j8 ^5 j( eNumber Start (sector) End (sector) Size Code Name
" Q) n. h/ I% X& B' V$ s. Y7 X' } 1 34 4294965343 2.0 TiB 0700 0
& q* f; ~+ K" z- nFAILED: disk=/dev/vdc partition=33: failed to get start sector3 `: S3 H! W9 ?. C% b ~6 H
[root@cusc_fortress ~]# lsblk - K* x$ R" a- v8 e3 x
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT- ?! `3 V1 V5 |* ~) t, o2 U
vda 252:0 0 50G 0 disk
$ ]$ ]; F8 r" O5 N) H4 K6 `├─vda1 252:1 0 1G 0 part /boot
4 p4 y( H& _9 `└─vda2 252:2 0 49G 0 part
: z+ J* k. q; `' A& y/ C( H7 C. K ├─centos-root 253:0 0 147G 0 lvm /
* q1 _; t" A* K$ |; |/ ` └─centos-swap 253:1 0 2G 0 lvm [SWAP]
; A3 V! v+ b; W2 K% c d8 uvdb 252:16 0 100G 0 disk
& d! K. M5 A5 l! |/ ?0 V└─vdb1 252:17 0 100G 0 part
. d' v* {% ?& }6 u# D' G S └─centos-root 253:0 0 147G 0 lvm /
c& l: N [1 c0 c* Nvdc 252:32 0 3T 0 disk 1 K! y8 N0 T: D: ^8 p! C
└─vdc1 252:33 0 2T 0 part /test
5 L/ g3 s: d* l5 [. J( Q! F5 X: J! O1 J2 B, u* |4 J3 P
6 A* ~4 w% y' f* k) ^ I$ W
growpart /dev/vdc 1
8 j6 G: y1 p3 |5 X+ xfailed [pt_update:1] pt_update /dev/vdc 1
( Y, _0 G- ^6 ~; s6 Wpartx: /dev/vdc: error updating partition 1; k# B! e9 S/ ]* ^* @
FAILED: disk=/dev/vdc partition=1: failed to repartition
+ u# D# H1 k4 J+ R; [***** WARNING: Resize failed, attempting to revert ******/ `/ {7 k4 H% }, Y, A. `
Warning: The kernel is still using the old partition table.+ X2 F' \( ~' @5 e( S! W
The new table will be used at the next reboot.
: S- q& i, _& ~" ]The operation has completed successfully.
7 L! z5 _9 R9 s; W1 f***** Appears to have gone OK ****
# S4 q$ v( O3 X6 Q; p0 y( I' c& f+ t/ R
9 B V, i8 f) W5 q C
: w1 N& a) z: R7 A/ L+ W9 F- G$ O9 A/ u+ e9 a! Y* f( n! W
|
|