- 积分
- 16844
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2024-7-22 23:15:17
|
显示全部楼层
[root@python-flask ~]# lsblk / m8 f9 U- b! C3 `2 m2 j
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS+ ?$ c* D" J. W. s$ q( U# Z; {2 R2 a
sr0 11:0 1 1024M 0 rom ' S, n) X4 k3 T# R5 M
nvme0n1 259:0 0 50G 0 disk # C" D, R1 r; _/ Y/ I! N# \: O9 }
├─nvme0n1p1 259:1 0 1G 0 part /boot
7 \9 J+ y% Y* L8 d V; f9 H2 [, i└─nvme0n1p2 259:2 0 39.1G 0 part * L+ ?2 _( X _/ g8 P% j: W
└─cs-root 253:0 0 39.1G 0 lvm /
' x. }0 W- k3 L* j[root@python-flask ~]# growpart /dev/nvme0n1 2" U2 x/ X5 {0 g, ~7 k- l
CHANGED: partition=2 start=2099200 old: size=82042880 end=84142079 new: size=102758367 end=1048575664 e- {) x" b4 L& Q! I
[root@python-flask ~]# lsblk
$ K3 l2 {! H3 _$ J$ v ?NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS+ m0 m3 \! i# Q5 }2 ~: V- x. t8 _
sr0 11:0 1 1024M 0 rom
" ?" u# m1 a1 G' Z5 I2 U$ Bnvme0n1 259:0 0 50G 0 disk ( O9 U! ^6 |' y0 P; q" C: p
├─nvme0n1p1 259:1 0 1G 0 part /boot# d- H! q- d% }
└─nvme0n1p2 259:2 0 49G 0 part
3 D" [; T, i+ X- E └─cs-root 253:0 0 39.1G 0 lvm /' t# @! ]3 }* q& j V( }& U
[root@python-flask ~]# pvscan
. R2 P6 v" c$ ?: ]$ p' C' u PV /dev/nvme0n1p2 VG cs lvm2 [<49.00 GiB / <9.88 GiB free]
1 V; }0 Q5 z$ s7 r8 X Total: 1 [<49.00 GiB] / in use: 1 [<49.00 GiB] / in no VG: 0 [0 ]: }$ ?3 |: _8 R; B
[root@python-flask ~]# lvscan " i: w0 e( M J. E L8 S1 Y
ACTIVE '/dev/cs/root' [<39.12 GiB] inherit
3 n# d( P6 j! `8 A[root@python-flask ~]# pvresize /dev/nvme0n1p2 # S% G% P) |* ^# F @2 M% @& S# o
Physical volume "/dev/nvme0n1p2" changed
9 _/ g3 _4 K4 J: w 1 physical volume(s) resized or updated / 0 physical volume(s) not resized
7 _; o% X3 ^8 l @; i8 M! S- Y' f# z[root@python-flask ~]# lvextend -l +100%FREE /dev/mapper/cs-root
9 d! L/ P3 z( w T Size of logical volume cs/root changed from <39.12 GiB (10014 extents) to <49.00 GiB (12543 extents).+ k/ `9 U& j$ R
Logical volume cs/root successfully resized.5 p, |- a# T* [; j! e) K
[root@python-flask ~]# xfs_
7 |5 \$ G/ y( ^" l' G6 a) B+ L% u" C& Txfs_admin xfs_copy xfs_estimate xfs_fsr xfs_info xfs_logprint xfs_metadump xfs_ncheck xfs_repair xfs_spaceman - Y# M O$ _ c6 n
xfs_bmap xfs_db xfs_freeze xfs_growfs xfs_io xfs_mdrestore xfs_mkfile xfs_quota xfs_rtcp
! y5 o8 k# c9 w7 A[root@python-flask ~]# xfs_
% l4 t+ h6 W0 a3 H9 L2 c. Mxfs_admin xfs_copy xfs_estimate xfs_fsr xfs_info xfs_logprint xfs_metadump xfs_ncheck xfs_repair xfs_spaceman
! E, C, I8 W, @2 W: H" R. Bxfs_bmap xfs_db xfs_freeze xfs_growfs xfs_io xfs_mdrestore xfs_mkfile xfs_quota xfs_rtcp ' j3 q# L2 }$ z6 L+ c) P4 O
[root@python-flask ~]# xfs_growfs /
( t- L: X" x* B+ F5 h( lmeta-data=/dev/mapper/cs-root isize=512 agcount=4, agsize=2563584 blks
* T9 U7 y9 `. \$ n9 K5 C = sectsz=512 attr=2, projid32bit=1
' f+ k7 _7 E4 O7 Q) f9 Y = crc=1 finobt=1, sparse=1, rmapbt=0+ ^' k9 e+ v. e1 U; p
= reflink=1 bigtime=1 inobtcount=1 nrext64=0
0 d. v9 x5 b+ O) G- v8 `data = bsize=4096 blocks=10254336, imaxpct=25
[: j% L7 S$ d( r) n = sunit=0 swidth=0 blks
. v! A- m, W6 `naming =version 2 bsize=4096 ascii-ci=0, ftype=1
$ K0 l) q4 T, |* m9 E ^4 |1 r, xlog =internal log bsize=4096 blocks=16384, version=2* }; N. L3 {& j l6 }! {( v
= sectsz=512 sunit=0 blks, lazy-count=1
$ f# ^9 e: z' \8 Yrealtime =none extsz=4096 blocks=0, rtextents=0: S: U6 Y) Q+ {8 O8 f2 s1 y* N& o: J9 Z
data blocks changed from 10254336 to 12844032+ g7 K) ]% M0 c
[root@python-flask ~]# df -h, O1 D; x) v; I+ c
文件系统 容量 已用 可用 已用% 挂载点
, i( }% E5 U( j( bdevtmpfs 4.0M 0 4.0M 0% /dev
2 ~+ ]. z/ R; @" F/ S+ W4 ~tmpfs 3.8G 0 3.8G 0% /dev/shm! h7 \7 A* b% o/ p( B& _
tmpfs 1.5G 12M 1.5G 1% /run; `( l( K, A( l3 @# e
/dev/mapper/cs-root 49G 4.8G 45G 10% /
1 x7 |9 ?6 \9 i0 n; D$ r. P' Z/dev/nvme0n1p1 960M 349M 612M 37% /boot
9 n6 e& u6 a9 A- N4 s) Atmpfs 766M 116K 766M 1% /run/user/01 Q0 K+ n1 q7 C1 b
8 J9 M |( f8 M& N, \, v3 k+ d8 K以上需要lvm标准版本,lvm简单配置版本无法扩容。
4 y, l# s8 m, X+ l, b |
|