Today I use below command to add mutiple path disk in linux system:
1: fdisk /dev/mapper/mpathlj
2:partx -a /dev/mapper/mpathlj
3: pvcreate /dev/mapper/mpathljp1
4: vgextend vg_one /dev/mapper/mpathljp1
5: lvextend -L +150G /dev/mapper/vg_one_01-lv_ora
6: resize2fs /dev/mapper/vg_one_01-lv_ora
Some problem occurred:
1: when fdisk processing, below wanring:
--
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
--- You CAN see can use "partprobe (8) or kpartx to fix some prolems.
--- OK, next step:
---
2: when doing the second step:
partx -a /dev/mapper/mpathlj
below problem occurred:
root@A]# partx -a /dev/mapper/mpathlj
BLKPG: Invalid argument
error adding partition 1
---- using kpartx to fix this problem:
[root@A]# kpartx -a /dev/mapper/mpathlj
----- neststep:
3: pvcreate /dev/mapper/mpathljp1
find the disk: /dev/mapper/mpathljp1 is not found.
when I check the path: 3: pvcreate /dev/mapper/mpathlj1 is created.
so I adjust command as :
3: pvcreate /dev/mapper/mpathlj1
---then execute below step is sucessfully:
4: vgextend vg_one /dev/mapper/mpathlj1
-- then extend the FS is successfully.
lesson learn: