[root@localhost ~]# pvcreate /dev/sdb /dev/sdc /dev/sdd
Physical volume “/dev/sdb” successfully created
Physical volume “/dev/sdc” successfully created
Physical volume “/dev/sdd” successfully created
pvs
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 rhel lvm2 a– 39.51g 0
/dev/sdb lvm2 a– 20.00g 20.00g
/dev/sdc lvm2 a– 20.00g 20.00g
/dev/sdd lvm2 a– 20.00g 20.00g
vgcreate backupvg /dev/sdb
[root@localhost ~]# vgcreate backupvg /dev/sdb
Volume group “backupvg” successfully created
vgs
[root@localhost ~]# vgs
VG #PV #LV #SN Attr VSize VFree
backupvg 1 0 0 wz–n- 20.00g 20.00g
rhel 1 2 0 wz–n- 39.51g 0
lvcreate -n lv_optback -L +5G backupvg
[root@localhost ~]# lvcreate -n lv_optback -L +5G backupvg
Logical volume “lv_optback” created
lvcreate -n lv_varback -L +5G backupvg
[root@localhost ~]# lvcreate -n lv_varback -L +5G backupvg
Logical volume “lv_varback” created
[root@localhost ~]# mkfs.xfs /dev/backupvg/lv_optback
meta-data=/dev/backupvg/lv_optback isize=256 agcount=4, agsize=327680 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0
data = bsize=4096 blocks=1310720, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@localhost ~]# mkdir /optback
root@localhost ~]# mount /dev/backupvg/lv_optback /optback/
[root@localhost ~]# df -TH
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 39G 4.1G 35G 11% /
devtmpfs devtmpfs 4.2G 0 4.2G 0% /dev
tmpfs tmpfs 4.2G 95k 4.2G 1% /dev/shm
tmpfs tmpfs 4.2G 39M 4.1G 1% /run
tmpfs tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup
/dev/sda1 xfs 507M 109M 398M 22% /boot
/dev/mapper/backupvg-lv_optback xfs 5.4G 34M 5.3G 1% /optback
[root@localhost ~]# lvextend -L +2G /dev/backupvg/lv_optback
Extending logical volume lv_optback to 7.00 GiB
Logical volume lv_optback successfully resized
root@localhost ~]# xfs_growfs /optback
meta-data=/dev/mapper/backupvg-lv_optback isize=256 agcount=4, agsize=327680 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0
data = bsize=4096 blocks=1310720, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 1310720 to 1835008
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 36G 3.8G 32G 11% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 92K 3.9G 1% /dev/shm
tmpfs 3.9G 38M 3.8G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 484M 104M 380M 22% /boot
/dev/mapper/backupvg-lv_optback 7.0G 33M 7.0G 1% /optback
Recent Comments