Skip to main content
The 2024 Developer Survey results are live! See the results
deleted 4 characters in body
Source Link
Arunas Bart
  • 1.6k
  • 17
  • 21

It seems I figured it out:

at first LVM VG was not seen at system at all, pvscan showed notno signs of attached foreign VG and physical volumes, but it seems, that some systems, like Synology Diskstation, have filter defined in /etc/lvm/lvm.conf and after commenting it out pvscan finally discovered attached PVs:

lvm pvscan
  PV /dev/md2    VG vg1         lvm2 [7.27 TiB / 0    free]
  PV /dev/md4    VG vg1         lvm2 [14.55 TiB / 3.80 TiB free]
  PV /dev/sdq2   VG vg-bw   lvm2 [2.73 TiB / 0    free]
  PV /dev/sdq1   VG vg-bw   lvm2 [1.82 TiB / 429.41 GiB free]

and finally VG appeared to be seen also:

lvm vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1" using metadata type lvm2
  Found volume group "vg-bw" using metadata type lvm2

bubut Volume Group and LVs are still not seen by system:

ls /dev/mapper/
vg1-volume_1               vg1-volume_2               
vg1-volume_3        

Trying to import foreign VG still no luck:

lvm vgimport vg-bw
  Volume group "vg-bw" is not exported

But theThe trick is very easy, just activate the VG!

vgchange -ay vg-bw
  2 logical volume(s) in volume group "vg-bw" now active

Yay! Here it is:

vgs
  VG        #PV #LV #SN Attr   VSize  VFree  
  vg-bw       2   2   0 wz--n-  4.55t 429.41g
  vg1         2   6   0 wz--n- 21.82t   3.80t

also seen by system:

ls /dev/mapper/
vg1-volume_1    vg1-volume_2  
vg1-volume_3    vg--bw-backup

Hope it helps others to save some time.

It seems I figured it out:

at first LVM VG was not seen at system at all, pvscan showed not signs of attached foreign VG and physical volumes, but it seems, that some systems, like Synology Diskstation, have filter defined in /etc/lvm/lvm.conf and after commenting it out pvscan finally discovered attached PVs:

lvm pvscan
  PV /dev/md2    VG vg1         lvm2 [7.27 TiB / 0    free]
  PV /dev/md4    VG vg1         lvm2 [14.55 TiB / 3.80 TiB free]
  PV /dev/sdq2   VG vg-bw   lvm2 [2.73 TiB / 0    free]
  PV /dev/sdq1   VG vg-bw   lvm2 [1.82 TiB / 429.41 GiB free]

and finally VG appeared to be seen also:

lvm vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1" using metadata type lvm2
  Found volume group "vg-bw" using metadata type lvm2

bu Volume Group and LVs are still not seen by system:

ls /dev/mapper/
vg1-volume_1               vg1-volume_2               
vg1-volume_3        

Trying to import foreign VG still no luck:

lvm vgimport vg-bw
  Volume group "vg-bw" is not exported

But the trick is very easy, just activate the VG!

vgchange -ay vg-bw
  2 logical volume(s) in volume group "vg-bw" now active

Yay! Here it is:

vgs
  VG        #PV #LV #SN Attr   VSize  VFree  
  vg-bw       2   2   0 wz--n-  4.55t 429.41g
  vg1         2   6   0 wz--n- 21.82t   3.80t

also seen by system:

ls /dev/mapper/
vg1-volume_1    vg1-volume_2  
vg1-volume_3    vg--bw-backup

Hope it helps others to save some time.

It seems I figured it out:

at first LVM VG was not seen at system at all, pvscan showed no signs of attached foreign VG and physical volumes, but it seems, that some systems, like Synology Diskstation, have filter defined in /etc/lvm/lvm.conf and after commenting it out pvscan finally discovered attached PVs:

lvm pvscan
  PV /dev/md2    VG vg1         lvm2 [7.27 TiB / 0    free]
  PV /dev/md4    VG vg1         lvm2 [14.55 TiB / 3.80 TiB free]
  PV /dev/sdq2   VG vg-bw   lvm2 [2.73 TiB / 0    free]
  PV /dev/sdq1   VG vg-bw   lvm2 [1.82 TiB / 429.41 GiB free]

and finally VG appeared to be seen also:

lvm vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1" using metadata type lvm2
  Found volume group "vg-bw" using metadata type lvm2

but Volume Group and LVs are still not seen by system:

ls /dev/mapper/
vg1-volume_1               vg1-volume_2               
vg1-volume_3        

Trying to import foreign VG still no luck:

lvm vgimport vg-bw
  Volume group "vg-bw" is not exported

The trick is very easy, just activate the VG!

vgchange -ay vg-bw
  2 logical volume(s) in volume group "vg-bw" now active

Yay! Here it is:

vgs
  VG        #PV #LV #SN Attr   VSize  VFree  
  vg-bw       2   2   0 wz--n-  4.55t 429.41g
  vg1         2   6   0 wz--n- 21.82t   3.80t

also seen by system:

ls /dev/mapper/
vg1-volume_1    vg1-volume_2  
vg1-volume_3    vg--bw-backup

Hope it helps others to save some time.

Source Link
Arunas Bart
  • 1.6k
  • 17
  • 21

It seems I figured it out:

at first LVM VG was not seen at system at all, pvscan showed not signs of attached foreign VG and physical volumes, but it seems, that some systems, like Synology Diskstation, have filter defined in /etc/lvm/lvm.conf and after commenting it out pvscan finally discovered attached PVs:

lvm pvscan
  PV /dev/md2    VG vg1         lvm2 [7.27 TiB / 0    free]
  PV /dev/md4    VG vg1         lvm2 [14.55 TiB / 3.80 TiB free]
  PV /dev/sdq2   VG vg-bw   lvm2 [2.73 TiB / 0    free]
  PV /dev/sdq1   VG vg-bw   lvm2 [1.82 TiB / 429.41 GiB free]

and finally VG appeared to be seen also:

lvm vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1" using metadata type lvm2
  Found volume group "vg-bw" using metadata type lvm2

bu Volume Group and LVs are still not seen by system:

ls /dev/mapper/
vg1-volume_1               vg1-volume_2               
vg1-volume_3        

Trying to import foreign VG still no luck:

lvm vgimport vg-bw
  Volume group "vg-bw" is not exported

But the trick is very easy, just activate the VG!

vgchange -ay vg-bw
  2 logical volume(s) in volume group "vg-bw" now active

Yay! Here it is:

vgs
  VG        #PV #LV #SN Attr   VSize  VFree  
  vg-bw       2   2   0 wz--n-  4.55t 429.41g
  vg1         2   6   0 wz--n- 21.82t   3.80t

also seen by system:

ls /dev/mapper/
vg1-volume_1    vg1-volume_2  
vg1-volume_3    vg--bw-backup

Hope it helps others to save some time.