: http://linux.vbird.org/linux_basic/0420quota.php#lvm) y! C9 Y+ A! ~
http://linux.vbird.org/linux_basic/0230filesystem.php#gdisk8 _+ |( [1 B6 u; P4 q6 q) {
- m0 S6 r& j& C[敶扳曉之LV摰寥]0 B: ^ B2 u% u
. }& Y1 I# _+ a0 V( d) }2 `. _0 g' h7 y9 K* I( d
1) lvextend -l 178813 /dev/11HD_vg/11HD_lv
& {' g0 f& F U% K. v4 D% A
( y, i+ m2 T+ G) e m6 `+ h% c$ o" l6 @4 [
178813舀炬憭抒size,憒2.7T=178813 PE, 1 PE=16MB! p# @: B# d2 l @4 E
S+ j- w+ P% |/ }
. V6 U3 y1 @) t6 M" A/ ?3 [2)lvresize -l 1966943 /dev/11HD_vg/11HD_lv0 l7 J, d; O5 r* Y/ o; Z
% {7 [0 u7 b2 @
# B: I% T: A$ m1966943臬憭批蝮編ize,憒30T=1966943 PE , 臭誑 vgdisplay 11HD_vg 亦桀 vg 閰喟敦鞈,咨otal size and free size ,桐賣 PE, ^- O# u- W0 X( ]
( Q2 J5 e/ R9 E( M! G& p1 u
1 Q. j1 y2 B: s( Y, M
3)resize2fs /dev/11HD_vg/11HD_lv( k; Y4 J( m* k
( s- D0 z5 D4 {6 x. M+ q n! `' O9 U" {& V t
P.S憒曆迷disk隞,雿輻 yum install gdisk 摰鋆8 {; z1 O5 u4 T6 M& b; ]+ h h
雿輻 gdisk 脩,
i1 g, ^ V! X3 GHex code or GUID (L to show codes, Enter = 8300): 頛詨8e00 ===> LVM (logical volumn manager)
4 g# p5 j, i' h/ [- e% S! p% ^
' V" e& k+ X( H( V5 p& d9 r( v K
1 [3 B9 {" |& Q& s1 }[蝘駁小v]
% k& a" e/ X; }6 I9 X% p# Zpvscan or pvdisplay 瘥蝖祉憿舐內:' y7 T, d7 J7 y% z
Couldn't find device with uuid WWeM0m-MLX2-o0da-tf7q-fJJu-eiGl-e7UmM3
+ Y* \* k+ s0 x6 x+ p- `PV Name unknown device4 K! p( [% y/ H' B" k: @/ ^
8 G6 g4 x; G3 J6 |9 B3 M4 _' i
望潛′蝣瘥,蝝汲G,甇日蝘駁 PV:
! C: l7 C a* }vgreduce --removemissing --force 11HD_vg #雿銋 LV芷,撱 LV9 Y" O- F; ~2 K% o, f
pvscan or pvdisplay 撠曹憿舐內 "unknown device"
+ v9 ~0 b d+ ~% ?; [- s4 Z% g) m" v0 K% m/ \7 R% c& B6 `2 }+ R0 o
5 [. T" [; R& J
[憒雿mount 撌脣冽潔憿蝖祉找LVMpartition]* S0 G( D) n, o# L3 L
#pvscan8 C* I3 }5 H7 Z1 l* f/ v1 y8 H! b5 v
PV /dev/sdc2 VG vg_centos6 lvm2 [27.46 GiB / 0 free] <===== 曆犖唾mount LVM (撌脣冽澆仿蝖祉)4 E6 U& @7 v. C+ P
PV /dev/sdb2 VG vg_test lvm2 [18.92 GiB / 0 free]
7 k$ d$ U& @, [6 O* u' {" P Total: 2 [46.39 GiB] / in use: 2 [46.39 GiB] / in no VG: 0 [0 ]9 `# L1 N* J/ Q. Z
" y _ i2 k! }8 ?: A7 M
#vgscan
: z+ E) W: @# o. ?" B% u Reading all physical volumes. This may take a while...
5 I# z' ~1 X) l# \$ F Found volume group "vg_centos6" using metadata type lvm2/ u. P/ ? @ |- l/ O
Found volume group "vg_test" using metadata type lvm2 |, q% F9 y; q; V% D: u
1 P) S# u$ {7 f$ v t& j, T& u- D
! {% y. o1 a" ?
#lvscan. C: N1 e$ h" D5 X# ]
inactive '/dev/vg_centos6/lv_root' [21.84 GiB] inherit <====芸
$ U3 ]7 h% G. D6 L7 R- | inactive '/dev/vg_centos6/lv_swap' [5.62 GiB] inherit <====芸
7 l7 o2 l# E: w- [ ACTIVE '/dev/vg_test/lv_root' [16.98 GiB] inherit
3 _2 I' X l# t% z/ R3 d' v ACTIVE '/dev/vg_test/lv_swap' [1.94 GiB] inherit
+ s% G' @8 }; O, y0 a& R# P" d* \, z# m# W4 J6 E" \- Y
, f8 W& e6 U9 G' F! q1 a. C#lvdisplay /dev/vg_centos6/lv_root
5 ?7 w% v1 Q4 d, o+ g( Y% ^ --- Logical volume ---1 [" j* i" A, d" ] o" ]$ V$ T
LV Path /dev/vg_centos6/lv_root7 |. C% q7 |9 o
LV Name lv_root
, b: H, V! z9 S" ]. U% }1 r VG Name vg_centos6
5 F+ Q/ `8 T7 V3 w% R LV UUID 0nFiiu-yDQG-1JUB-JI2r-uoTe-Hupi-WGisCe8 |& q3 I8 K. m: U
LV Write Access read/write9 r, |5 X- ~% o1 {% v
LV Creation host, time ,
, |) ~$ K3 y8 \/ _ LV Status unavailable <==== 銝舐
2 I6 n! r! C/ p5 x$ y$ n, h # open 1' H9 f- i9 s/ X
LV Size 21.84 GiB& V* J0 B6 S7 k! m( ^( f( M
Current LE 5591
$ m; x6 Y7 [8 J( S& I( N2 S Segments 1, b2 `- T' J6 ~4 X6 _* p/ S3 [
Allocation inherit F; w& S- [3 @7 x6 W
Read ahead sectors auto
7 G1 g# j" C$ `, `+ b1 e$ w% [6 { - currently set to 256' l! e, s! T9 i) N8 X( {. W
Block device 253:2: U4 q# g1 u# A. Z# m- K) i4 s% `
3 d6 E+ I; v' v( X4 K$ ?
9 j4 b f) z* d0 _! y( M暺券鋆:
1 J6 [6 P$ g9 E) C2 t2 uvgchange -ay vg_centos6 <====== VG (憒 VG ==> vgchange -an vg_centos6)& J1 w, u' r. C7 P
乩甈 LV:
8 U$ p0 y* L$ W- z& N$ W0 e#lvscan
5 z/ u3 F. D5 w, b+ @. p. Q% W1 X ACTIVE '/dev/vg_centos6/lv_root' [21.84 GiB] inherit <====撌脣鈭% b+ U3 y7 V+ \1 q# U
ACTIVE '/dev/vg_centos6/lv_swap' [5.62 GiB] inherit <====撌脣鈭0 q' a! s8 V6 u
ACTIVE '/dev/vg_test/lv_root' [16.98 GiB] inherit
/ k9 K* T5 _6 R- `; a ACTIVE '/dev/vg_test/lv_swap' [1.94 GiB] inherit, ^" O5 o7 h+ V( ` b) x# B( c8 v$ G% F
, p& m$ H/ Q4 ]/ Z
3 R1 K8 n A+ }4 z- j# b) ymount LVM:% n! B% n/ }/ `2 e
mkdir /mnt/lvmdisk
c2 Y- w+ ^( F0 ^mount /dev/vg_centos6/lv_root /mnt/lvmdisk) p3 P% y1 I; u
憭批! N9 _" f" r4 ?1 {( {5 z
* \. a: ^2 l. Z* s) @. ~$ J% I1 S9 |/ ?2 N* O
|
|