Step 1: Check the existing space in mount-point.
[root@rac2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 14G 11G 3.9G 73% /
devtmpfs 863M 0 863M 0% /dev
tmpfs 873M 92K 873M 1% /dev/shm
tmpfs 873M 8.8M 865M 2% /run
tmpfs 873M 0 873M 0% /sys/fs/cgroup
/dev/sda1 497M 150M 348M 31% /boot
RAC_Setup 200G 105G 96G 53% /media/sf_RAC_Setup
/dev/sr0 58M 58M 0 100% /run/media/oracle/VBox_GAs_5.2.1
Step 2: Shut down the Virtual Box.
Step 3: Add new disk of any size you want to add using below method.
[root@rac2 ~]# fdisk /dev/sde
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x8a73f78e.
Command (m for help): p
Disk /dev/sde: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x8a73f78e
Device Boot Start End Blocks Id System
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):
Using default value 20971519
Partition 1 of type Linux and of size 10 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac2 ~]#
Step 5: Create pv(Physical Volume as below and check the same once done.
[root@rac2 ~]# pvcreate /dev/sde1
Physical volume "/dev/sde1" successfully created
[root@rac2 ~]#
[root@rac2 ~]#
[root@rac2 ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name ol
PV Size 15.51 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3970
Free PE 10
Allocated PE 3960
PV UUID 7E8Ggc-H7Ft-JD3q-xqvx-WQSM-czw1-0pTNFF
"/dev/sde1" is a new physical volume of "10.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sde1
VG Name
PV Size 10.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID f707sL-SLfH-vBku-yJcI-fw27-vzbd-piMb6g
[root@rac2 ~]# pvcreate /dev/sde1
Physical volume "/dev/sde1" successfully created
[root@rac2 ~]#
[root@rac2 ~]#
[root@rac2 ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name ol
PV Size 15.51 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3970
Free PE 10
Allocated PE 3960
PV UUID 7E8Ggc-H7Ft-JD3q-xqvx-WQSM-czw1-0pTNFF
"/dev/sde1" is a new physical volume of "10.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sde1
VG Name
PV Size 10.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID f707sL-SLfH-vBku-yJcI-fw27-vzbd-piMb6g
Step 6: Now get the available volume group details.
[root@rac2 ~]# vgdisplay
--- Volume group ---
VG Name ol
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 15.51 GiB
PE Size 4.00 MiB
Total PE 3970
Alloc PE / Size 3960 / 15.47 GiB
Free PE / Size 10 / 40.00 MiB
VG UUID PkA07A-894K-Ksze-Njop-Eann-amAM-upUNgD
Step 7: Now extend the volume group and check again available vg. Newly free space will get added.
[root@rac2 ~]# vgextend ol /dev/sde1
Volume group "ol" successfully extended
[root@rac2 ~]#
[root@rac2 ~]#
[root@rac2 ~]# vgdisplay
--- Volume group ---
VG Name ol
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 25.50 GiB
PE Size 4.00 MiB
Total PE 6529
Alloc PE / Size 3960 / 15.47 GiB
Free PE / Size 2569 / 10.04 GiB
VG UUID PkA07A-894K-Ksze-Njop-Eann-amAM-upUNgD
Step 8: Now find out the logical volume needs to be extended.
[root@rac2 ~]# lvdisplay
--- Logical volume ---
LV Path /dev/ol/swap
LV Name swap
VG Name ol
LV UUID S088QM-IZyH-xf07-jHea-2Ctd-U8M9-SguuMA
LV Write Access read/write
LV Creation host, time localhost, 2017-11-21 15:42:57 +0530
LV Status available
# open 2
LV Size 1.60 GiB
Current LE 410
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 252:1
--- Logical volume ---
LV Path /dev/ol/root
LV Name root
VG Name ol
LV UUID YYWL5z-Wtd2-iBZ1-10TN-lO9s-pkZQ-1ztPCT
LV Write Access read/write
LV Creation host, time localhost, 2017-11-21 15:42:58 +0530
LV Status available
# open 1
LV Size 13.87 GiB
Current LE 3550
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 252:0
Step 9: Extend the logical volume "root" located in "/dev/ol/root" using below command. Check the size of the mount-point.The space has not been added yet.
[root@rac2 ~]# lvextend /dev/ol/root /dev/sde1
Size of logical volume ol/root changed from 13.87 GiB (3550 extents) to 23.86 GiB (6109 extents).
Logical volume root successfully resized
[root@rac2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 14G 11G 3.9G 73% /
devtmpfs 863M 0 863M 0% /dev
tmpfs 873M 115M 759M 14% /dev/shm
tmpfs 873M 8.8M 865M 2% /run
tmpfs 873M 0 873M 0% /sys/fs/cgroup
/dev/sda1 497M 150M 348M 31% /boot
RAC_Setup 200G 105G 96G 53% /media/sf_RAC_Setup
/dev/sr0 58M 58M 0 100% /run/media/oracle/VBox_GAs_5.2.1
Step 10 : Run below command to add space in Logical Volume.
[root@rac2 ~]# xfs_growfs /dev/ol/root
meta-data=/dev/mapper/ol-root isize=256 agcount=4, agsize=908800 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=3635200, 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
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 3635200 to 6255616
[root@rac2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 24G 11G 14G 43% /
devtmpfs 863M 0 863M 0% /dev
tmpfs 873M 115M 759M 14% /dev/shm
tmpfs 873M 8.8M 865M 2% /run
tmpfs 873M 0 873M 0% /sys/fs/cgroup
/dev/sda1 497M 150M 348M 31% /boot
RAC_Setup 200G 105G 96G 53% /media/sf_RAC_Setup
/dev/sr0 58M 58M 0 100% /run/media/oracle/VBox_GAs_5.2.1
Thanks for reading this post ! Please comment if you like this post.
cudiaPulya Kimberly Vaughn https://www.lonicerainvestments.com/profile/edmondoedmondoedmondo/profile
ReplyDeletebrimogistor
Ymasnislan_yu-Pueblo Stacy Cordova click here
ReplyDeletelink
download
link
erroracna
Ocrepasmoe_ru Thomas Newman there
ReplyDeleteSoftware
maesuncopa