/ mountpoint increase in OEL (Oracle Enterprise Linux)
Below are the steps for increasing / mountpoint in OEL:
Step 1 :
Notedown the LV and VG details of / mountpoint. Here for root mountpoint we have mirror lvs LVDbSys1 and LVDbSys2. The size of LVDbSys1 is 30GB and suppose we are going to increase it by 6GB.
root@jk root]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
LVDbSwap1 VGJkDb -wi-ao---- 24.00g
LVDbSys1 VGJkDb -wi-a----- 30.00g
LVDbSys2 VGJkDb -wi-ao---- 30.00g
LVDoNotRemoveOrUse VGJkDb -wi-a----- 1.00g
[root@jk root]#
[root@jk root]# vgs
VG #PV #LV #SN Attr VSize VFree
VGJkDb 2 5 0 wz--n- <834.89g <549.89g
Step 2: Here the primary root disk LV is LVDbSys2, so will increase it first by using lvextend command.
[root@jk root]# lvextend -L +6G /dev/mapper/VGJkDb-LVDbSys2
Size of logical volume VGJkDb/LVDbSys2 changed from 30.00 GiB (7680 extents) to 36.00 GiB (9216 extents).
Logical volume VGJkDb/LVDbSys2 successfully resized.
[root@jk root]#
[root@jk root]# resize2fs /dev/mapper/VGJkDb-LVDbSys2
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/mapper/VGJkDb-LVDbSys2 is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 3
The filesystem on /dev/mapper/VGJkDb-LVDbSys2 is now 9437184 blocks long.
[root@jk root]#
[root@jk root]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VGJkDb-LVDbSys2 36G 24G 9.8G 71% /
Step 3 : Now increase mirror lv of root ie LVDbSys1:
[root@jk root]# lvextend -L +6G /dev/mapper/VGJkDb-LVDbSys1
Size of logical volume VGJkDb/LVDbSys1 changed from 30.00 GiB (7680 extents) to 36.00 GiB (9216 extents).
Logical volume VGJkDb/LVDbSys1 successfully resized.
[root@jk root]#
[root@jk root]# resize2fs /dev/mapper/VGJkDb-LVDbSys1
resize2fs 1.42.9 (28-Dec-2013)
Please run 'e2fsck -f /dev/mapper/VGJkDb-LVDbSys1' first.
Step 4: While doing resize2fs on secondary root lv, the command is saying to run e2fsk on the secondary root lv.
[root@jk root]# e2fsck -f /dev/mapper/VGJkDb-LVDbSys1
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/VGJkDb-LVDbSys1: 111758/1966080 files (0.1% non-contiguous), 5772289/7864320 blocks
Step 5 : once it is successfull, run resize2fs command on LVDbSys1:
[root@jk root]# resize2fs /dev/mapper/VGJkDb-LVDbSys1
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/mapper/VGJkDb-LVDbSys1 to 9437184 (4k) blocks.
The filesystem on /dev/mapper/VGJkDb-LVDbSys1 is now 9437184 blocks long.
Step 6 : Now run lvs command, will see increase LV size for LVDbSys2 and LVDbSys1:
[root@jk root]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
LVDbSwap1 VGJkDb -wi-ao---- 24.00g
LVDbSys1 VGJkDb -wi-a----- 36.00g
LVDbSys2 VGJkDb -wi-ao---- 36.00g
LVDoNotRemoveOrUse VGJkDb -wi-a----- 1.00g
Step 7 : Note down the increase size of / mount point in df command:
[root@jk root]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VGJkDb-LVDbSys2 36G 24G 9.8G 71% /
[root@jk root]#
Regards,
Kalynajit
No comments:
Post a Comment