Adding new disk/LUN under multipath Linux mpath.
Suppose we want to add a new disk where multipath is configured.
Lets add a 20Gb LUN and set up it under multipath on server.
Create vg_products volume group on with /oracledba filesystem.
1. Ask storage team to export LUN to the system and take the UUID of the SAN disk(s) presented.
2. Scan for the new disks
echo "- - -" > /sys/class/scsi_host/host0/scan echo "- - -" > /sys/class/scsi_host/host1/scan echo "- - -" > /sys/class/scsi_host/host2/scan
3. Now use multipath to search for your UUID.
# multipath -l | grep -i X00507680C8084XX5800000000000XXX mpathao (3X00507680C8084XX5800000000000XXX) dm-51 IBM ,2145
4. Now define an alias so that we can create our PV.
# vi /etc/multipath.conf # Add below in appropriate place: multipath { wwid 3600507680c8084395800000000000117 alias mpath_NGEcop_redo } multipath { wwid 3X00507680C8084XX5800000000000XXX alias mpath_oracledba }
Please note lowercase letters, and the UUID needs a “3” in front.
5. Restart multipathd daemon
# systemctl restart multipathd
6. Check if new multipath identified.
ngelinux001.ngelinux.com--> multipath -l | grep -i X00507680C8084XX5800000000000XXX mpath_oracledba (3X00507680C8084XX5800000000000XXX) dm-51 IBM ,2145
7. Create new physical volume from this mpath.
# pvcreate /dev/mapper/mpath_oracledba
8. Create new Volume
Edit /etc/lvm/lvm.conf to tell it this volume group needs to be trated as a LOCAL one.
In case this server is in cluster, we have to tell it that the filesystem is local.
# vi /etc/lvm.conf
volume_list = [ "vg_NGEL051", "vg_NGEcop_backup", "vg_NGEcop_data", "vg_NGEcop_oracle", "vg_NGEcop_redo", "vg_hmpre_oracle", "vg_hmpreprd_hm_back", "vg_hmpreprd_hm_data", "vg_hmpreprd_hm_redo", "vg_soahmpre_back", "vg_soahmpre_data", "vg_soahmpre_redo", "vg_products" ]
9. Create new logical volume and mount it on system.
### Create new LV. # lvcreate -l 100%FREE -n lv_oracledba vg_products ### Format the volume # mkfs -t ext4 /dev/mapper/vg_products-lv_oracledba # Create mount point and change its permissions. # mkdir /oracledba ; chmod 775 /oracledba # vi /etc/fstab and add the required line. /dev/mapper/vg_products-lv_oracledba /oracledba ext4 defaults 1 2 ### Mount the partition # mount /oracledba ### Change ownership # chown orahmpre:oinstall /oracledba