Cur PV 4
Act PV 4
VG Size 3.94 GiB
PE Size 16.00 MiB
Total PE 252
Alloc PE / Size 128 / 2.00 GiB
Free PE / Size 124 / 1.94 GiB
#
看起
剩余容量确
500M
的!
VG UUID Rx7zdR
-
y2cY
-
HuIZ
-
Yd2s
-
odU8
-
AkTW
-
okk4Ea
#
既然
VG
的容量
大了!所以直½
放大
LV
吧!!
# 2.
放大
LV
吧!利用
lvresize
的功能
增加!
[root@study ~]#
lvresize
-
L +500M /dev/vbirdvg/vbirdlv
Rounding size to boundary between physical extents: 512.00 MiB
Size of logical volume vbirdvg/vbirdlv changed from 2.00 GiB (128 extents) to 2.50 GiB
(160 extents).
Logical volume vbirdlv successfully resized
#
这样
就增加了
LV
了喔!
lvresize
法很
简单
,基本上同
-
l
-
L
增加!
#
若要增加
使用
+
,若要
使用
-
详细
选项请参
man lvresize
[root@study ~]#
lvscan
ACTIVE '/dev/vbirdvg/vbirdlv' [2.50 GiB] inherit
ACTIVE '/dev/centos/root' [10.00 GiB] inherit
ACTIVE '/dev/centos/home' [5.00 GiB] inherit
ACTIVE '/dev/centos/swap' [1.00 GiB] inherit
#
可以
发现
/dev/vbirdvg/vbirdlv
容量由
2G
增加到
2.5G
[root@study ~]#
df
-
Th /srv/lvm
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vbirdvg
-
vbirdlv xfs
2.0G
111M 1.9G 6% /srv/lvm
看到了吧?最终的½果中
LV
真的有放大到
2.5GB
喔!但是文件系统却没有相对增加!而且,我们
LVM
可以在线直½处理,并不需要特别给他
umount
哩!真是人性化!
但是还是得要处理一下
文件系统的容量啦!开始观察一下文件系统,然后使用
xfs_growfs
来处理一下吧!
# 3.1
先看一下原本的文件系
统内
superblock
记录
吧!
[root@study ~]#
xfs_info /srv/lvm
meta
-
data=/dev/mapper/vbirdvg
-
vbirdlv isize=256
agcount=4
, agsize=131072 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096
blocks=524288
, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii
-
ci=0 ftype=0
log =internal bsize=4096 blocks=2560, version=2