Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vgimportclone fails if the original VG is created with vgmetadatacopies #103

Closed
subodh01 opened this issue Jan 5, 2023 · 2 comments
Closed

Comments

@subodh01
Copy link

subodh01 commented Jan 5, 2023

I created original VG using 3 vgmetadatacopies.

vgcreate --vgmetadatacopies 3 72210625_34e4_4423_6fc5_4a14bbe5e6e5 /dev/sdbb /dev/sdbc /dev/sdbd /dev/sdbe

After that I take a snapshot and clone this VG. Now vgimportclone fails.

vgimportclone -n 2c83f6e4_d516_4b6b_428d_08d44c1bae3d -i /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm

If the original VG is not created with "--vgmetadatacopies 3", vgimportclone succeeds.

@subodh01
Copy link
Author

subodh01 commented Jan 5, 2023

vgimportclone -n 2c83f6e4_d516_4b6b_428d_08d44c1bae3d -i /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm
  log/command_names not found in config: defaulting to 0
  Version: 2.03.14(2)-RHEL8 (2021-10-20)
  Parsing: vgimportclone -n 2c83f6e4_d516_4b6b_428d_08d44c1bae3d -i /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm
  Recognised command vgimportclone_general (id 158 / enum 138).
  devices/scan_lvs not found in config: defaulting to 0
  devices/allow_mixed_block_sizes not found in config: defaulting to 0
  devices/hints not found in config: defaulting to "all"
  activation/activation_mode not found in config: defaulting to "degraded"
  metadata/record_lvs_history not found in config: defaulting to 0
  devices/search_for_devnames not found in config: defaulting to "auto"
  DEGRADED MODE. Incomplete RAID LVs will be processed.
  activation/monitoring not found in config: defaulting to 1
  Processing command: vgimportclone -n 2c83f6e4_d516_4b6b_428d_08d44c1bae3d -i /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm
  Command pid: 1473
  System ID: 
  O_DIRECT will be used
  global/locking_type not found in config: defaulting to 1
  global/wait_for_locks not found in config: defaulting to 1
  File locking settings: readonly:0 sysinit:0 ignorelockingfailure:0 global/metadata_read_only:0 global/wait_for_locks:1.
  global/prioritise_write_locks not found in config: defaulting to 1
  global/locking_dir not found in config: defaulting to "/run/lock/lvm"
  devices/md_component_detection not found in config: defaulting to 1
  devices/md_component_checks not found in config: defaulting to "auto"
  Using md_component_checks auto use_full_md_check 0
  devices/multipath_wwids_file not found in config: defaulting to "/etc/multipath/wwids"
  multipath wwids file not found
  global/use_lvmlockd not found in config: defaulting to 0
  Locking /run/lock/lvm/P_global WB
  _do_flock /run/lock/lvm/P_global:aux WB
  _do_flock /run/lock/lvm/P_global WB
  _undo_flock /run/lock/lvm/P_global:aux
  clear_hint_file
  newhints created
  devices/use_devicesfile not found in config: defaulting to 0
  Creating list of system devices.
  Found dev 253:4 /dev/2f8e8eed_296d_4a6d_733c_bfe293590506/ntnxLV - exists. 
  Found dev 253:1 /dev/4b94d7a0_3ed1_4b7c_6ae5_9c3f32bf05af/ntnxLV - exists. 
  Found dev 253:0 /dev/71dbce39_83cc_4c42_41d5_ae4c7427901d/ntnxLV - exists. 
  Found dev 11:0 /dev/block/11:0 - exists. 
  Found dev 253:0 /dev/block/253:0 - exists. 
  Found dev 253:1 /dev/block/253:1 - exists. 
  Found dev 253:2 /dev/block/253:2 - exists. 
  Found dev 253:3 /dev/block/253:3 - exists. 
  Found dev 253:4 /dev/block/253:4 - exists. 
  Found dev 67:112 /dev/block/67:112 - exists. 
  Found dev 67:128 /dev/block/67:128 - exists. 
  Found dev 67:208 /dev/block/67:208 - exists. KYHy18yW
  Found dev 67:224 /dev/block/67:224 - exists. iejiPNt7
  Found dev 67:240 /dev/block/67:240 - exists. yow41rY8
  Found dev 67:80 /dev/block/67:80 - exists. 
  Found dev 67:96 /dev/block/67:96 - exists. 
  Found dev 68:0 /dev/block/68:0 - exists. oDQXRmW0
  Found dev 8:0 /dev/block/8:0 - exists. 
  Found dev 8:1 /dev/block/8:1 - exists. 
  Found dev 8:16 /dev/block/8:16 - exists. 
  Found dev 8:2 /dev/block/8:2 - exists. 
  Found dev 8:32 /dev/block/8:32 - exists. 
  Found dev 8:48 /dev/block/8:48 - exists. 
  Found dev 8:64 /dev/block/8:64 - exists. 
  Found dev 253:3 /dev/c6b03868_50b7_4d23_6f76_f8db017bd3b8/ntnxLV - exists. 
  Found dev 11:0 /dev/cdrom - exists. 
  Found dev 11:0 /dev/disk/by-id/ata-QEMU_DVD-ROM_QM00001 - exists. 
  Found dev 253:4 /dev/disk/by-id/dm-name-2f8e8eed_296d_4a6d_733c_bfe293590506-ntnxLV - exists. 
  Found dev 253:1 /dev/disk/by-id/dm-name-4b94d7a0_3ed1_4b7c_6ae5_9c3f32bf05af-ntnxLV - exists. 
  Found dev 253:0 /dev/disk/by-id/dm-name-71dbce39_83cc_4c42_41d5_ae4c7427901d-ntnxLV - exists. 
  Found dev 253:3 /dev/disk/by-id/dm-name-c6b03868_50b7_4d23_6f76_f8db017bd3b8-ntnxLV - exists. 
  Found dev 253:2 /dev/disk/by-id/dm-name-edfff1d4_2d06_4ff7_7205_21bfa3c4090c-ntnxLV - exists. 
  Found dev 253:4 /dev/disk/by-id/dm-uuid-LVM-7rCB9e2LEGC75eUVllqbDQQa1IZ2y6Z0xubJyW5NWXwvseBsmQULGYYdn2oOiMBp - exists. 
  Found dev 253:2 /dev/disk/by-id/dm-uuid-LVM-8xI1220FfFlJcE4ET3XnfW9Zt9Le3DUNJ36mtjxjmqSulaBGDO0ukasVc7fr9du9 - exists. 
  Found dev 253:3 /dev/disk/by-id/dm-uuid-LVM-AMbqSPSa4JQP10Q6B3VnXgEZUHxLPX7BxubJyW5NWXwvseBsmQULGYYdn2oOiMBp - exists. 
  Found dev 253:0 /dev/disk/by-id/dm-uuid-LVM-CBwOsHcftQC2bzKLLoM3w4S9g3aYHoZoJqZnbUqjGpnF9MXLfVSb0ofzWjHQpLCZ - exists. 
  Found dev 253:1 /dev/disk/by-id/dm-uuid-LVM-vr5v3HoKjAPzzAoZGkN0hgjsgfyBwoQbXXy9sUpWVNAnY82m2J8f3eD7sqROY0MA - exists. 
  Found dev 67:208 /dev/disk/by-id/lvm-pv-uuid-KYHy18-yWia-Q34d-2PsX-zVN6-VgtH-36j9hA - exists. KYHy18yW
  Found dev 67:224 /dev/disk/by-id/lvm-pv-uuid-iejiPN-t7hb-msJi-epla-gdjD-aqrd-d1vFKe - exists. iejiPNt7
  Found dev 68:0 /dev/disk/by-id/lvm-pv-uuid-oDQXRm-W0zh-DwCg-Rchw-qRzB-lnXl-oYjUMG - exists. oDQXRmW0
  Found dev 67:240 /dev/disk/by-id/lvm-pv-uuid-yow41r-Y8v5-2Kx3-7LxA-QmLq-zkXd-FLpPs2 - exists. yow41rY8
  Found dev 8:32 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_271_aa238b26_c459_47af_817b_419c902ceb13 - exists. 
  Found dev 8:48 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_272_ad24a2e1_6078_422e_8d50_fc43bccbde01 - exists. 
  Found dev 8:64 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_342_88ff83a2_7dfd_47a4_8d07_b2daa9acebc0 - exists. 
  Found dev 67:80 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_693_5c600cad_0532_4dba_89a9_d7f73bc5950d - exists. 
  Found dev 67:96 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_694_f3027cf9_d6d1_4afc_a998_3f03887d20b4 - exists. 
  Found dev 67:112 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_695_c0f37c1f_3df6_4aef_94da_ef56714ba171 - exists. 
  Found dev 67:128 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_696_92ca5156_fcea_416e_a38a_5cb49256eb54 - exists. 
  Found dev 67:208 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_752_33181cd2_59f4_4ad9_904d_e16949403869 - exists. KYHy18yW
  Found dev 67:224 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_754_9148fae0_62e0_4933_85bf_d64dfbf8013b - exists. iejiPNt7
  Found dev 67:240 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_756_5af910a2_6ed7_48ea_a1cb_b92d1634d618 - exists. yow41rY8
  Found dev 68:0 /dev/disk/by-id/scsi-1NUTANIX_NFS_2_0_758_98bb33a2_c931_441d_9141_bd3e9c794d89 - exists. oDQXRmW0
  Found dev 8:0 /dev/disk/by-id/scsi-1NUTANIX_NFS_3_0_419_e251909e_f865_4718_8ac7_36c785db146a - exists. 
  Found dev 8:1 /dev/disk/by-id/scsi-1NUTANIX_NFS_3_0_419_e251909e_f865_4718_8ac7_36c785db146a-part1 - exists. 
  Found dev 8:2 /dev/disk/by-id/scsi-1NUTANIX_NFS_3_0_419_e251909e_f865_4718_8ac7_36c785db146a-part2 - exists. 
  Found dev 8:16 /dev/disk/by-id/scsi-1NUTANIX_NFS_3_0_420_19f5bd31_8248_447d_bd86_96fd0851badc - exists. 
  Found dev 11:0 /dev/disk/by-label/config-2 - exists. 
  Found dev 8:64 /dev/disk/by-path/ip-10.40.147.103:3260-iscsi-iqn.2010-06.com.nutanix:ntnx-k8s-289c11f5-6243-41aa-73a9-dd3c6757fb6f-tgt0-lun-0 - exists. 
  Found dev 8:48 /dev/disk/by-path/ip-10.40.147.103:3260-iscsi-iqn.2010-06.com.nutanix:ntnx-k8s-3036d0df-4cae-4b12-ae21-341ae3e60b1c-tgt0-lun-0 - exists. 
  Found dev 8:32 /dev/disk/by-path/ip-10.40.147.103:3260-iscsi-iqn.2010-06.com.nutanix:ntnx-k8s-4e65eedc-2b03-4d53-b87c-cc09c2cf8dd4-tgt0-lun-0 - exists. 
  Found dev 11:0 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 - exists. 
  Found dev 8:0 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:0:0 - exists. 
  Found dev 8:1 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:0:0-part1 - exists. 
  Found dev 8:2 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:0:0-part2 - exists. 
  Found dev 8:16 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:1:0 - exists. 
  Found dev 67:96 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:2:0 - exists. 
  Found dev 67:112 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:2:1 - exists. 
  Found dev 67:80 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:2:2 - exists. 
  Found dev 67:128 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:2:3 - exists. 
  Found dev 67:224 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:3:0 - exists. iejiPNt7
  Found dev 67:240 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:3:1 - exists. yow41rY8
  Found dev 67:208 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:3:2 - exists. KYHy18yW
  Found dev 68:0 /dev/disk/by-path/pci-0000:00:04.0-scsi-0:0:3:3 - exists. oDQXRmW0
  Found dev 8:64 /dev/disk/by-uuid/0468da54-dccd-4536-8edb-47b2fae47c5e - exists. 
  Found dev 11:0 /dev/disk/by-uuid/2022-11-29-03-31-43-00 - exists. 
  Found dev 8:1 /dev/disk/by-uuid/4f642fe5-1555-4ce4-9660-b5e68d5e0af5 - exists. 
  Found dev 8:48 /dev/disk/by-uuid/547cc13c-1695-41b4-91b1-7405a73232c3 - exists. 
  Found dev 253:2 /dev/disk/by-uuid/605fc7b4-c40f-491a-85ea-9930483a6302 - exists. 
  Found dev 253:0 /dev/disk/by-uuid/67d13737-0fdc-4ca4-a6a6-d928c37377ff - exists. 
  Found dev 8:16 /dev/disk/by-uuid/7fbc49ff-0f92-4e8c-b069-8f8eacffa8c0 - exists. 
  Found dev 253:4 /dev/disk/by-uuid/b1e87afa-ef32-45bc-9fbf-f3dcbf475563 - exists. 
  Found dev 8:2 /dev/disk/by-uuid/b91fd06a-7709-4d57-81fe-9301fd7768e5 - exists. 
  Found dev 8:32 /dev/disk/by-uuid/c9d29716-2158-4082-b322-e66ab2332b20 - exists. 
  Found dev 253:1 /dev/disk/by-uuid/e24c1ae2-457c-4dd1-97af-1f0c7fa80cc6 - exists. 
  Found dev 253:0 /dev/dm-0 - exists. 
  Found dev 253:1 /dev/dm-1 - exists. 
  Found dev 253:2 /dev/dm-2 - exists. 
  Found dev 253:3 /dev/dm-3 - exists. 
  Found dev 253:4 /dev/dm-4 - exists. 
  Found dev 253:2 /dev/edfff1d4_2d06_4ff7_7205_21bfa3c4090c/ntnxLV - exists. 
  /dev/fd: Symbolic link to directory
  /dev/hugepages: Different filesystem in directory
  /dev/initctl: stat failed: No such file or directory
  Found dev 253:4 /dev/mapper/2f8e8eed_296d_4a6d_733c_bfe293590506-ntnxLV - exists. 
  Found dev 253:1 /dev/mapper/4b94d7a0_3ed1_4b7c_6ae5_9c3f32bf05af-ntnxLV - exists. 
  Found dev 253:0 /dev/mapper/71dbce39_83cc_4c42_41d5_ae4c7427901d-ntnxLV - exists. 
  Found dev 253:3 /dev/mapper/c6b03868_50b7_4d23_6f76_f8db017bd3b8-ntnxLV - exists. 
  Found dev 253:2 /dev/mapper/edfff1d4_2d06_4ff7_7205_21bfa3c4090c-ntnxLV - exists. 
  /dev/mqueue: Different filesystem in directory
  /dev/pts: Different filesystem in directory
  Found dev 8:0 /dev/sda - exists. 
  Found dev 8:1 /dev/sda1 - exists. 
  Found dev 8:2 /dev/sda2 - exists. 
  Found dev 8:16 /dev/sdb - exists. 
  Found dev 67:80 /dev/sdbb - exists. 
  Found dev 67:96 /dev/sdbc - exists. 
  Found dev 67:112 /dev/sdbd - exists. 
  Found dev 67:128 /dev/sdbe - exists. 
  Found dev 67:208 /dev/sdbj - exists. KYHy18yW
  Found dev 67:224 /dev/sdbk - exists. iejiPNt7
  Found dev 67:240 /dev/sdbl - exists. yow41rY8
  Found dev 68:0 /dev/sdbm - exists. oDQXRmW0
  Found dev 8:32 /dev/sdc - exists. 
  Found dev 8:48 /dev/sdd - exists. 
  Found dev 8:64 /dev/sde - exists. 
  /dev/shm: Different filesystem in directory
  Found dev 11:0 /dev/sr0 - exists. 
  /dev: Failed to insert devices to device cache fully
  /dev/sdbj: size is 25165824 sectors
  Closed /dev/sdbj
  filter caching good /dev/sdbj
  /dev/sdbk: size is 25165824 sectors
  Closed /dev/sdbk
  filter caching good /dev/sdbk
  /dev/sdbl: size is 25165824 sectors
  Closed /dev/sdbl
  filter caching good /dev/sdbl
  /dev/sdbm: size is 25165824 sectors
  Closed /dev/sdbm
  filter caching good /dev/sdbm
  scan new devs
  Scanning 4 devices for VG info
  open /dev/sdbj ro di 0 fd 6
  open /dev/sdbk ro di 1 fd 7
  open /dev/sdbl ro di 2 fd 8
  open /dev/sdbm ro di 3 fd 9
  Scanning submitted 4 reads
  Processing data from device /dev/sdbj 67:208 di 0
  /dev/sdbj: using cached size 25165824 sectors
  /dev/sdbj: using cached size 25165824 sectors
  filter caching good /dev/sdbj
  Found label at sector 1 on /dev/sdbj
  Found PVID KYHy18yWiaQ34d2PsXzVN6VgtH36j9hA on /dev/sdbj
  lvmcache /dev/sdbj: now in VG #orphans_lvm2 #orphans_lvm2
  Scanning /dev/sdbj mda1 summary.
  Reading mda header sector from /dev/sdbj at 4096
  Reading metadata summary from /dev/sdbj at 8192 size 1716 (+0)
  Found metadata summary on /dev/sdbj at 8192 size 1716 for VG c6b03868_50b7_4d23_6f76_f8db017bd3b8
  lvmcache adding vginfo for c6b03868_50b7_4d23_6f76_f8db017bd3b8 AMbqSP-Sa4J-QP10-Q6B3-VnXg-EZUH-xLPX7B
  lvmcache /dev/sdbj: now in VG c6b03868_50b7_4d23_6f76_f8db017bd3b8 AMbqSPSa4JQP10Q6B3VnXgEZUHxLPX7B
  lvmcache /dev/sdbj: VG c6b03868_50b7_4d23_6f76_f8db017bd3b8: set VGID to AMbqSPSa4JQP10Q6B3VnXgEZUHxLPX7B.
  lvmcache /dev/sdbj mda1 VG c6b03868_50b7_4d23_6f76_f8db017bd3b8 set seqno 3 checksum 60916e3e mda_size 1716
  lvmcache /dev/sdbj: VG c6b03868_50b7_4d23_6f76_f8db017bd3b8: set creation host to app-rv-80c2a3-worker-0.
  Found metadata seqno 3 in mda1 on /dev/sdbj
  Processing data from device /dev/sdbk 67:224 di 1
  /dev/sdbk: using cached size 25165824 sectors
  /dev/sdbk: using cached size 25165824 sectors
  filter caching good /dev/sdbk
  Found label at sector 1 on /dev/sdbk
  Found PVID iejiPNt7hbmsJieplagdjDaqrdd1vFKe on /dev/sdbk
  lvmcache /dev/sdbk: now in VG #orphans_lvm2 #orphans_lvm2
  Scanning /dev/sdbk mda1 summary.
  Reading mda header sector from /dev/sdbk at 4096
  Setting ignored flag for mda /dev/sdbk at offset 4096.
  Ignoring mda on device /dev/sdbk at offset 4096
  Processing data from device /dev/sdbl 67:240 di 2
  /dev/sdbl: using cached size 25165824 sectors
  /dev/sdbl: using cached size 25165824 sectors
  filter caching good /dev/sdbl
  Found label at sector 1 on /dev/sdbl
  Found PVID yow41rY8v52Kx37LxAQmLqzkXdFLpPs2 on /dev/sdbl
  lvmcache /dev/sdbl: now in VG #orphans_lvm2 #orphans_lvm2
  Scanning /dev/sdbl mda1 summary.
  Reading mda header sector from /dev/sdbl at 4096
  Skipping read of already known VG metadata with matching mda checksum on /dev/sdbl.
  Found metadata summary on /dev/sdbl at 8192 size 1716 for VG c6b03868_50b7_4d23_6f76_f8db017bd3b8
  lvmcache /dev/sdbl: now in VG c6b03868_50b7_4d23_6f76_f8db017bd3b8 AMbqSPSa4JQP10Q6B3VnXgEZUHxLPX7B
  Found metadata seqno 3 in mda1 on /dev/sdbl
  Processing data from device /dev/sdbm 68:0 di 3
  /dev/sdbm: using cached size 25165824 sectors
  /dev/sdbm: using cached size 25165824 sectors
  filter caching good /dev/sdbm
  Found label at sector 1 on /dev/sdbm
  Found PVID oDQXRmW0zhDwCgRchwqRzBlnXloYjUMG on /dev/sdbm
  lvmcache /dev/sdbm: now in VG #orphans_lvm2 #orphans_lvm2
  Scanning /dev/sdbm mda1 summary.
  Reading mda header sector from /dev/sdbm at 4096
  Skipping read of already known VG metadata with matching mda checksum on /dev/sdbm.
  Found metadata summary on /dev/sdbm at 8192 size 1716 for VG c6b03868_50b7_4d23_6f76_f8db017bd3b8
  lvmcache /dev/sdbm: now in VG c6b03868_50b7_4d23_6f76_f8db017bd3b8 AMbqSPSa4JQP10Q6B3VnXgEZUHxLPX7B
  Found metadata seqno 3 in mda1 on /dev/sdbm
  Scanned devices: read errors 0 process errors 0 failed 0
  /dev/sdbj: filter cache using (cached good)
  /dev/sdbk: filter cache using (cached good)
  /dev/sdbl: filter cache using (cached good)
  /dev/sdbm: filter cache using (cached good)
  Unlocking /run/lock/lvm/P_global
  _undo_flock /run/lock/lvm/P_global
  global/notify_dbus not found in config: defaulting to 1
  Failed to connect to dbus: -2
  Destroy lvmcache content
  Completed: vgimportclone -n 2c83f6e4_d516_4b6b_428d_08d44c1bae3d -i /dev/sdbj /dev/sdbk /dev/sdbl /dev/sdbm
  Command Log
  ===========
  Seq LogType Context ObjType ObjName       ObjID   ObjGrp  ObjGrpID Msg                               Errno RetCode
    1 error   shell   cmd     vgimportclone                          Devices must be from the same VG.    -1       0
    2 status  shell   cmd     vgimportclone                          failure                               0       5
l

@teigland
Copy link
Contributor

teigland commented Jan 5, 2023

Thanks for the report, it was a simple bug fixed here
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c4b898a53eec39bc28b5451e7fde87945303a644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants