Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA-294319: Do not create PV on first device
In the upstream lvm2 (v2_02_177), it handles duplicate PVs differently with currently used lvm2(v2_02_130) in XenSever. It will prefer first PV but before it will choose last PV it sees. For example: root@xrtuk-13-09 ~]# ll /dev/disk/by-id/scsi-3600a098038303973743f486833396d42 lrwxrwxrwx 1 root root 10 Aug 27 08:51 /dev/disk/by-id/scsi-3600a098038303973743f486833396d42 -> ../../sdak From the log: SM: [12939] WARNING: PV Iyrwu7-JpT6-l8dX-9K8x-Rz2z-n9hV-SUzMf9 on /dev/sdak was already found on /dev/sdd So it the device will excluded by a filter internally. There may be two options we can try to fix this issu: 1: Patch upstream lvm2 to let it use last seen PV, but from the trend of upstream, it will prefer to use first seen PV and lots of code related with change. So it will need lots of effort to do this patch. 2: When we creat VG, from current code logic, it will firstly create PV for each device and then create a VG for the first device, at last add other PVs to the VG. So we can skip first device to create PV as VG create will initialize the PV by using function "pvcreate_each_device". Signed-off-by: Taoyong Ding <taoyong.ding@citrix.com>
- Loading branch information