1) Verify Multipath Devices in order to know the last one
[root@unixaddiction ~]# multipath -ll
mpathd (360060e80139cfc0050209cfc00000994) dm-3 HITACHI,OPEN-V
size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:2 sdd 8:48 active ready running
`- 12:0:0:2 sdi 8:128 active ready running
mpathc (360060e80139cfc0050209cfc00000993) dm-4 HITACHI,OPEN-V
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:1 sdc 8:32 active ready running
`- 12:0:0:1 sdh 8:112 active ready running
mpathb (360060e80139cfc0050209cfc00000992) dm-6 HITACHI,OPEN-V
size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:0 sdb 8:16 active ready running
`- 12:0:0:0 sdg 8:96 active ready running
mpathi (360060e80139cfc0050209cfc000009d1) dm-5 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:4 sdf 8:80 active ready running
`- 12:0:0:4 sdk 8:160 active ready running
mpathh (360060e80139cfc0050209cfc000009ce) dm-2 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:3 sde 8:64 active ready running
`- 12:0:0:3 sdj 8:144 active ready running
2) Rescan new device
echo "- - -" > /sys/class/scsi_host/hostx/scan (cambiar hostx por host0, host1, etc...)
or script
/usr/bin/rescan-scsi-bus.sh
3) List Devices
[root@unixaddiction ~]# multipath -ll
mpathd (360060e80139cfc0050209cfc00000994) dm-3 HITACHI,OPEN-V
size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:2 sdd 8:48 active ready running
`- 12:0:0:2 sdi 8:128 active ready running
mpathc (360060e80139cfc0050209cfc00000993) dm-4 HITACHI,OPEN-V
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:1 sdc 8:32 active ready running
`- 12:0:0:1 sdh 8:112 active ready running
mpathb (360060e80139cfc0050209cfc00000992) dm-6 HITACHI,OPEN-V
size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:0 sdb 8:16 active ready running
`- 12:0:0:0 sdg 8:96 active ready running
mpathj (360060e80139cfc0050209cfc00000946) dm-17 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:5 sdl 8:176 active ready running
`- 12:0:0:5 sdm 8:192 active ready running
mpathi (360060e80139cfc0050209cfc000009d1) dm-5 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:4 sdf 8:80 active ready running
`- 12:0:0:4 sdk 8:160 active ready running
mpathh (360060e80139cfc0050209cfc000009ce) dm-2 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:3 sde 8:64 active ready running
`- 12:0:0:3 sdj 8:144 active ready running
We will see that mpathj will be available to use
[root@unixaddiction ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 278.9G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 278.4G 0 part
├─unixaddiction-lv_root (dm-0) 253:0 0 50G 0 lvm /
└─unixaddiction-lv_swap (dm-1) 253:1 0 224G 0 lvm [SWAP]
sdb 8:16 0 400G 0 disk
└─mpathb (dm-6) 253:6 0 400G 0 mpath
├─vg_02-oracle1 (dm-7) 253:7 0 100G 0 lvm /oracle1
├─vg_02-oracle2 (dm-8) 253:8 0 100G 0 lvm /oracle2
├─vg_02-oracle3 (dm-9) 253:9 0 100G 0 lvm /oracle3
└─vg_02-oracle4 (dm-10) 253:10 0 100G 0 lvm /oracle4
sdc 8:32 0 500G 0 disk
└─mpathc (dm-4) 253:4 0 500G 0 mpath
├─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
└─vg_03-archive (dm-12) 253:12 0 250G 0 lvm /archive
sdd 8:48 0 650G 0 disk
└─mpathd (dm-3) 253:3 0 650G 0 mpath
├─vg_01-apps (dm-13) 253:13 0 400G 0 lvm /export/apps
├─vg_01-env (dm-14) 253:14 0 6G 0 lvm /export/env
├─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
└─vg_01-licenses (dm-16) 253:16 0 12G 0 lvm /export/licenses
sde 8:64 0 200G 0 disk
└─mpathh (dm-2) 253:2 0 200G 0 mpath
└─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
sdf 8:80 0 200G 0 disk
└─mpathi (dm-5) 253:5 0 200G 0 mpath
└─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
sdg 8:96 0 400G 0 disk
└─mpathb (dm-6) 253:6 0 400G 0 mpath
├─vg_02-oracle1 (dm-7) 253:7 0 100G 0 lvm /oracle1
├─vg_02-oracle2 (dm-8) 253:8 0 100G 0 lvm /oracle2
├─vg_02-oracle3 (dm-9) 253:9 0 100G 0 lvm /oracle3
└─vg_02-oracle4 (dm-10) 253:10 0 100G 0 lvm /oracle4
sdh 8:112 0 500G 0 disk
└─mpathc (dm-4) 253:4 0 500G 0 mpath
├─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
└─vg_03-archive (dm-12) 253:12 0 250G 0 lvm /archive
sdi 8:128 0 650G 0 disk
└─mpathd (dm-3) 253:3 0 650G 0 mpath
├─vg_01-apps (dm-13) 253:13 0 400G 0 lvm /export/apps
├─vg_01-env (dm-14) 253:14 0 6G 0 lvm /export/env
├─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
└─vg_01-val (dm-16) 253:16 0 12G 0 lvm /export/val
sdj 8:144 0 200G 0 disk
└─mpathh (dm-2) 253:2 0 200G 0 mpath
└─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
sdk 8:160 0 200G 0 disk
└─mpathi (dm-5) 253:5 0 200G 0 mpath
└─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
sdl 8:176 0 200G 0 disk
└─mpathj (dm-17) 253:17 0 200G 0 mpath
sdm 8:192 0 200G 0 disk
└─mpathj (dm-17) 253:17 0 200G 0 mpath
Check the new device in this case mpathJ
3) Create the new Physical Volume
pvcreate /dev/mapper/mpathj
3.1 Format and Label as Linux LVM
fdisk /dev/mapper/mpathj
option n to create new partition, option p primary, and assign .
option T el Partition Type, In this case 8e (Linux LVM).
4) Increase the FS /oracle, increase the space for the Volume Group vg_02
vgextend vg_02 /dev/mapper/mpathj
5) Check the space available to check how much space you have available for each one (oracle1, oracle2, etc...)
[root@unixaddiction ~]# vgdisplay vg_02
--- Volume group ---
VG Name vg_02
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 4
Max PV 0
Cur PV 1
Act PV 1
VG Size 400.00 GiB
PE Size 4.00 MiB
Total PE 102399
Alloc PE / Size 102398 / 399.99 GiB
Free PE / Size -----> You should see the space HERE
VG UUID BrWrju-9fTn-8EU8-y6o3-zeby-iLTr-OjGSrs
6) Increase Logical Volume, execute
lvextend - l +(Extends) /dev/mapper/vg_02-oracle1
or with GB
lvextend - L +(cantidad de Gigabites) /dev/mapper/vg_02-oracle1
7) Resize the FS without umount
resize2fs /dev/mapper/vg_02-oracle1
8) If you need to create a new FS
example /oracle05:
lvcreate -L 100G --name oracle5 vg_02
mkfs.ext4 /dev/mapper/vg_02-oracle5
[root@unixaddiction ~]# multipath -ll
mpathd (360060e80139cfc0050209cfc00000994) dm-3 HITACHI,OPEN-V
size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:2 sdd 8:48 active ready running
`- 12:0:0:2 sdi 8:128 active ready running
mpathc (360060e80139cfc0050209cfc00000993) dm-4 HITACHI,OPEN-V
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:1 sdc 8:32 active ready running
`- 12:0:0:1 sdh 8:112 active ready running
mpathb (360060e80139cfc0050209cfc00000992) dm-6 HITACHI,OPEN-V
size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:0 sdb 8:16 active ready running
`- 12:0:0:0 sdg 8:96 active ready running
mpathi (360060e80139cfc0050209cfc000009d1) dm-5 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:4 sdf 8:80 active ready running
`- 12:0:0:4 sdk 8:160 active ready running
mpathh (360060e80139cfc0050209cfc000009ce) dm-2 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:3 sde 8:64 active ready running
`- 12:0:0:3 sdj 8:144 active ready running
2) Rescan new device
echo "- - -" > /sys/class/scsi_host/hostx/scan (cambiar hostx por host0, host1, etc...)
or script
/usr/bin/rescan-scsi-bus.sh
3) List Devices
[root@unixaddiction ~]# multipath -ll
mpathd (360060e80139cfc0050209cfc00000994) dm-3 HITACHI,OPEN-V
size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:2 sdd 8:48 active ready running
`- 12:0:0:2 sdi 8:128 active ready running
mpathc (360060e80139cfc0050209cfc00000993) dm-4 HITACHI,OPEN-V
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:1 sdc 8:32 active ready running
`- 12:0:0:1 sdh 8:112 active ready running
mpathb (360060e80139cfc0050209cfc00000992) dm-6 HITACHI,OPEN-V
size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:0 sdb 8:16 active ready running
`- 12:0:0:0 sdg 8:96 active ready running
mpathj (360060e80139cfc0050209cfc00000946) dm-17 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:5 sdl 8:176 active ready running
`- 12:0:0:5 sdm 8:192 active ready running
mpathi (360060e80139cfc0050209cfc000009d1) dm-5 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:4 sdf 8:80 active ready running
`- 12:0:0:4 sdk 8:160 active ready running
mpathh (360060e80139cfc0050209cfc000009ce) dm-2 HITACHI,OPEN-V
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:3 sde 8:64 active ready running
`- 12:0:0:3 sdj 8:144 active ready running
We will see that mpathj will be available to use
[root@unixaddiction ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 278.9G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 278.4G 0 part
├─unixaddiction-lv_root (dm-0) 253:0 0 50G 0 lvm /
└─unixaddiction-lv_swap (dm-1) 253:1 0 224G 0 lvm [SWAP]
sdb 8:16 0 400G 0 disk
└─mpathb (dm-6) 253:6 0 400G 0 mpath
├─vg_02-oracle1 (dm-7) 253:7 0 100G 0 lvm /oracle1
├─vg_02-oracle2 (dm-8) 253:8 0 100G 0 lvm /oracle2
├─vg_02-oracle3 (dm-9) 253:9 0 100G 0 lvm /oracle3
└─vg_02-oracle4 (dm-10) 253:10 0 100G 0 lvm /oracle4
sdc 8:32 0 500G 0 disk
└─mpathc (dm-4) 253:4 0 500G 0 mpath
├─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
└─vg_03-archive (dm-12) 253:12 0 250G 0 lvm /archive
sdd 8:48 0 650G 0 disk
└─mpathd (dm-3) 253:3 0 650G 0 mpath
├─vg_01-apps (dm-13) 253:13 0 400G 0 lvm /export/apps
├─vg_01-env (dm-14) 253:14 0 6G 0 lvm /export/env
├─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
└─vg_01-licenses (dm-16) 253:16 0 12G 0 lvm /export/licenses
sde 8:64 0 200G 0 disk
└─mpathh (dm-2) 253:2 0 200G 0 mpath
└─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
sdf 8:80 0 200G 0 disk
└─mpathi (dm-5) 253:5 0 200G 0 mpath
└─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
sdg 8:96 0 400G 0 disk
└─mpathb (dm-6) 253:6 0 400G 0 mpath
├─vg_02-oracle1 (dm-7) 253:7 0 100G 0 lvm /oracle1
├─vg_02-oracle2 (dm-8) 253:8 0 100G 0 lvm /oracle2
├─vg_02-oracle3 (dm-9) 253:9 0 100G 0 lvm /oracle3
└─vg_02-oracle4 (dm-10) 253:10 0 100G 0 lvm /oracle4
sdh 8:112 0 500G 0 disk
└─mpathc (dm-4) 253:4 0 500G 0 mpath
├─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
└─vg_03-archive (dm-12) 253:12 0 250G 0 lvm /archive
sdi 8:128 0 650G 0 disk
└─mpathd (dm-3) 253:3 0 650G 0 mpath
├─vg_01-apps (dm-13) 253:13 0 400G 0 lvm /export/apps
├─vg_01-env (dm-14) 253:14 0 6G 0 lvm /export/env
├─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
└─vg_01-val (dm-16) 253:16 0 12G 0 lvm /export/val
sdj 8:144 0 200G 0 disk
└─mpathh (dm-2) 253:2 0 200G 0 mpath
└─vg_01-home (dm-15) 253:15 0 432G 0 lvm /export/home
sdk 8:160 0 200G 0 disk
└─mpathi (dm-5) 253:5 0 200G 0 mpath
└─vg_03-redlog (dm-11) 253:11 0 450G 0 lvm /redlog
sdl 8:176 0 200G 0 disk
└─mpathj (dm-17) 253:17 0 200G 0 mpath
sdm 8:192 0 200G 0 disk
└─mpathj (dm-17) 253:17 0 200G 0 mpath
Check the new device in this case mpathJ
3) Create the new Physical Volume
pvcreate /dev/mapper/mpathj
3.1 Format and Label as Linux LVM
fdisk /dev/mapper/mpathj
option n to create new partition, option p primary, and assign .
option T el Partition Type, In this case 8e (Linux LVM).
4) Increase the FS /oracle, increase the space for the Volume Group vg_02
vgextend vg_02 /dev/mapper/mpathj
5) Check the space available to check how much space you have available for each one (oracle1, oracle2, etc...)
[root@unixaddiction ~]# vgdisplay vg_02
--- Volume group ---
VG Name vg_02
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 4
Max PV 0
Cur PV 1
Act PV 1
VG Size 400.00 GiB
PE Size 4.00 MiB
Total PE 102399
Alloc PE / Size 102398 / 399.99 GiB
Free PE / Size -----> You should see the space HERE
VG UUID BrWrju-9fTn-8EU8-y6o3-zeby-iLTr-OjGSrs
6) Increase Logical Volume, execute
lvextend - l +(Extends) /dev/mapper/vg_02-oracle1
or with GB
lvextend - L +(cantidad de Gigabites) /dev/mapper/vg_02-oracle1
7) Resize the FS without umount
resize2fs /dev/mapper/vg_02-oracle1
8) If you need to create a new FS
example /oracle05:
lvcreate -L 100G --name oracle5 vg_02
mkfs.ext4 /dev/mapper/vg_02-oracle5
Comments