[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] LVM2 recovery on IP-SAN after OS re-install



Bryn,


Thanks for the mail but I might have just created a havoc by force removing the PV
Here is a series of commands and output ..

[root datanalytics4 ~]# pvs
  Found duplicate PV XtGmeFOiCTWpLBckKZKlGtYKPVdBgVJn: using /dev/sdd1 not /dev/sdc1
  PV           VG  Fmt  Attr    PSize     PFree 
  /dev/sda5  vg1  lvm2 a--     162.99G     0 
  /dev/sdb5  vg2  lvm2 a--     230.97G   20.97G
  /dev/PV    VG   Fmt   Attr  PSize       PFree
[root datanalytics4 ~]# 

[root datanalytics4 ~]# pvdisplay 
  Found duplicate PV XtGmeFOiCTWpLBckKZKlGtYKPVdBgVJn: using /dev/sdd1 not /dev/sdc1
  --- Physical volume ---
  PV Name               /dev/sdd1
  VG Name               vg0
  PV Size               5.45 TB / not usable 1.14 MB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              1428127
  Free PE               2063
  Allocated PE          1426064
  PV UUID               XtGmeF-OiCT-WpLB-ckKZ-KlGt-YKPV-dBgVJn
   
  --- Physical volume ---
  PV Name               /dev/sdb5
  VG Name               vg2
  PV Size               230.98 GB / not usable 3.41 MB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              59129
  Free PE               5369
  Allocated PE          53760
  PV UUID               UP9bH6-Huaf-02ua-tsL0-lfcU-axc3-CIkSvS
   
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               vg1
  PV Size               162.99 GB / not usable 1.83 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              41725
  Free PE               0
  Allocated PE          41725
  PV UUID               9DSyjC-fvzX-wMTa-7NNG-JOzZ-Tu3F-utmpFT
   
[root datanalytics4 ~]# 


[root datanalytics4 ~]# pvremove --force --force  /dev/sdc1
  Found duplicate PV XtGmeFOiCTWpLBckKZKlGtYKPVdBgVJn: using /dev/sdd1 not /dev/sdc1
Really WIPE LABELS from physical volume "/dev/sdc1" of volume group "vg0" [y/n]? y
  WARNING: Wiping physical volume label from /dev/sdc1 of volume group "vg0"
  Labels on physical volume "/dev/sdc1" successfully wiped

NOW

[root datanalytics4 ~]# pvs
  PV         VG   Fmt  Attr PSize   PFree 
  /dev/sda5  vg1  lvm2 a--  162.99G     0 
  /dev/sdb5  vg2  lvm2 a--  230.97G 20.97G
[root datanalytics4 ~]#

I see the the major chunk vg0 is gone ...however the file system still exists in df -h

Filesystem                          Size  Used Avail Use% Mounted on
/dev/mapper/vg2-data3          07G  188M  197G   1% /data3
/dev/mapper/vg1-data--sys     61G  188M  153G   1% /data-sys
/dev/mapper/vg0-data             2.0T  1.4T  561G  71% /data
/dev/mapper/vg0-data1           2.0T 1001G  914G  53% /data1
/dev/mapper/vg0-data2           1.5T  1.2T  184G  87% /data2

[root datanalytics4 ~]# dmsetup ls
vg0-data2 (253, 4)
vg0-data1 (253, 2)
vg1-data--sys (253, 1)
vg0-data (253, 3)
vg2-data3 (253, 0)
[root datanalytics4 ~]#


[root datanalytics4 ~]# dmsetup -vvv status
dm version   OF   [16384]
dm names   OF   [16384]
dm status vg0-data2  OF   [16384]
Name:              vg0-data2
State:             ACTIVE
vg0-data2: read ahead is 256
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 4
Number of targets: 1
UUID: LVM-nvyZYGRy1X5SmKvKhqdpOeb4DZVxsdFgUX0dltiRbAVlZEuS2onnkTcEcDguv4IN

0 3092381696 linear 

dm status vg0-data1  OF   [16384]
Name:              vg0-data1
State:             ACTIVE
vg0-data1: read ahead is 256
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 2
Number of targets: 1
UUID: LVM-nvyZYGRy1X5SmKvKhqdpOeb4DZVxsdFgUWO0MJ5zoLA1Tgpa1wor3aAV35LItt46

0 4294967296 linear 

dm status vg1-data--sys  OF   [16384]
Name:              vg1-data--sys
State:             ACTIVE
vg1-data--sys: read ahead is 256
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 1
Number of targets: 1
UUID: LVM-gIeIufCQkSPf4iElhYM7c2Ja1OJZvycI55wsnecjG3VANNHAMz1BmThmiEIKh02b

0 341811200 linear 

dm status vg0-data  OF   [16384]
Name:              vg0-data
State:             ACTIVE
vg0-data: read ahead is 256
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 3
Number of targets: 1
UUID: LVM-nvyZYGRy1X5SmKvKhqdpOeb4DZVxsdFgQe2Q2DWZcxbwsPEaD2OsF7ZmgUsnCVfE

0 4294967296 linear 

dm status vg2-data3  OF   [16384]
Name:              vg2-data3
State:             ACTIVE
vg2-data3: read ahead is 256
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 0
Number of targets: 1
UUID: LVM-kCeA3BTSB2jeagki4MtPzswpZMmS2nuHXCMnuXWN9YdPlDuiLo03ebvuCMZTkzBr

0 440401920 linear 

[root datanalytics4 ~]# 


as you can see above the file systems are there but i dont see the vg and lv in the system now 

[root datanalytics4 ~]# pvs
  PV         VG   Fmt  Attr PSize   PFree 
  /dev/sda5  vg1  lvm2 a--  162.99G     0 
  /dev/sdb5  vg2  lvm2 a--  230.97G 20.97G
[root datanalytics4 ~]# vgs -a
  VG   #PV #LV #SN Attr   VSize   VFree 
  vg1    1   1   0 wz--n- 162.99G     0 
  vg2    1   1   0 wz--n- 230.97G 20.97G
[root datanalytics4 ~]# lvs -a
  LV       VG   Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  data-sys vg1  -wi-ao 162.99G                                      
  data3    vg2  -wi-ao 210.00G                                      
[root datanalytics4 ~]#


Did I screw up ?? is there a way to fix ? why does lvm not show the vg0 its LV's but they exist in the system >?


On Tue, Jun 19, 2012 at 10:10 PM, Bryn M. Reeves <bmr redhat com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/28/2012 07:40 PM, tariq wali wrote:
> I tried to fix this by but it just won't go.. vgreduce
> --removemissing vg0 Found duplicate PV
> XtGmeFOiCTWpLBckKZKlGtYKPVdBgVJn: using /dev/sdd1 not /dev/sdc1
> Volume group "vg0" is already consistent
>
> why does LVM think that it's still using PV ( /dev/sdc1 ) when it
> no more exists ? and how do i get rid of it ?

Although you have removed the PV from the volume group it still has a
PV label on it which has the same UUID value as some other valid
device that is part of the volume group.

You should verify which device is correct and then remove the PV label
from the other device (or re-run pvcreate to give it a new random UUID):

# pvremove /dev/sdc1

Once the label is removed you should stop seeing those messages.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/gq5EACgkQ6YSQoMYUY97zTACdEn2l2OkwM/4naoqzZwJFDSiO
WpYAnjSN8Uppia//lZK28FnhXvyDwK+Y
=v7ST
-----END PGP SIGNATURE-----



--
Tariq Wali.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]