LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 05-04-2015, 06:25 AM   #1
ccj4467
Member
 
Registered: Jan 2009
Posts: 34

Rep: Reputation: 5
LVM Problems


While moving my fileserver to a new rack I inadvertently connected the cables of the disk arrays to the wrong SAS ports. When I rebooted the disksgot assigned new UUIDs but the old ones were not removed, so the volume group will not activate and mount.

My question is how do I remove the old metadata?

System details:
CentOS 6.2
Dell Poweredge r210
LSI MegaRAID 9280
2 Sans digital disk enclosures

Here is the LVM info

Output of vgdisplay

Code:
[root@fileserver1 ~]# vgdisplay
  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  --- Volume group ---
  VG Name               vg_fileserver1
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232.34 GiB
  PE Size               4.00 MiB
  Total PE              59479
  Alloc PE / Size       56272 / 219.81 GiB
  Free  PE / Size       3207 / 12.53 GiB
  VG UUID               H5j4pR-FfXp-lmJI-HCSH-vzze-foY3-WYeN9p

  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  WARNING: Duplicate VG name raid_vg: YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  Couldn't find device with uuid dXKp0D-ePyc-0agV-nyvO-inYa-IeHx-oqnTzH.
  --- Volume group ---
  VG Name               raid_vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               47.29 TiB
  PE Size               128.00 MiB
  Total PE              387398
  Alloc PE / Size       387398 / 47.29 TiB
  Free  PE / Size       0 / 0
  VG UUID               mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM

  WARNING: Duplicate VG name raid_vg: YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  --- Volume group ---
  VG Name               raid_vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               47.29 TiB
  PE Size               128.00 MiB
  Total PE              387398
  Alloc PE / Size       387398 / 47.29 TiB
  Free  PE / Size       0 / 0
  VG UUID               YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68
Here is the output of pvdisplay

Code:
[root@fileserver1 ~]# pvdisplay
  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  Couldn't find device with uuid dXKp0D-ePyc-0agV-nyvO-inYa-IeHx-oqnTzH.
  Couldn't find device with uuid ZpLv0l-ZU6W-aaJN-vhz0-Q1YM-Dg1f-QIkaky.
  --- Physical volume ---
  PV Name               /dev/sdc2
  VG Name               vg_fileserver1
  PV Size               232.34 GiB / not usable 0
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              59479
  Free PE               3207
  Allocated PE          56272
  PV UUID               Hde0Er-DQ7d-gNEH-Xdcg-RsTO-dzcX-OZFQkj

  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  --- Physical volume ---
  PV Name               unknown device
  VG Name               raid_vg
  PV Size               35.47 TiB / not usable 128.00 MiB
  Allocatable           yes (but full)
  PE Size               128.00 MiB
  Total PE              290575
  Free PE               0
  Allocated PE          290575
  PV UUID               dXKp0D-ePyc-0agV-nyvO-inYa-IeHx-oqnTzH

  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               raid_vg
  PV Size               11.82 TiB / not usable 128.00 MiB
  Allocatable           yes (but full)
  PE Size               128.00 MiB
  Total PE              96823
  Free PE               0
  Allocated PE          96823
  PV UUID               dLp6jQ-RN49-Pn78-qDzG-cb53-Z8jw-E2TJ6u

  --- Physical volume ---
  PV Name               /dev/sda
  VG Name               raid_vg
  PV Size               35.47 TiB / not usable 128.00 MiB
  Allocatable           yes (but full)
  PE Size               128.00 MiB
  Total PE              290575
  Free PE               0
  Allocated PE          290575
  PV UUID               dpKb1Y-70sL-nVPh-ldNp-eU6U-GC8V-PGEeHH

  --- Physical volume ---
  PV Name               unknown device
  VG Name               raid_vg
  PV Size               11.82 TiB / not usable 128.00 MiB
  Allocatable           yes (but full)
  PE Size               128.00 MiB
  Total PE              96823
  Free PE               0
  Allocated PE          96823
  PV UUID               ZpLv0l-ZU6W-aaJN-vhz0-Q1YM-Dg1f-QIkaky
And here is what I have tried

Code:
[root@fileserver1 ~]# vgrename mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM oldraid_vg
  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  WARNING: Duplicate VG name raid_vg: YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  Couldn't find device with uuid dXKp0D-ePyc-0agV-nyvO-inYa-IeHx-oqnTzH.
  Cannot change VG raid_vg while PVs are missing.
  Consider vgreduce --removemissing.
[root@fileserver1 ~]# vgreduce --removemissing mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  WARNING: Duplicate VG name raid_vg: Existing YTeFq5-zMZR-LC2B-4ceg-aDkj-urx6-q25s68 (created here) takes precedence over mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM
  Volume group "mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM" not found
  Internal error: Attempt to unlock unlocked VG mBV0yW-CEQG-Tc2l-UolE-gpm9-5vAQ-nmMjsM.
As you can see there are 2 PVs that are an unknown device and that seems to be causing problems.

How should I proceed?
Ihave googledand googled but have found now solution.
 
Old 05-04-2015, 02:55 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
What does vgcfgrestore --list raid_vg says, do you see anything in the archive which got created just before you carried out this activity?
 
Old 05-05-2015, 06:56 AM   #3
ccj4467
Member
 
Registered: Jan 2009
Posts: 34

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by T3RM1NVT0R View Post
What does vgcfgrestore --list raid_vg says, do you see anything in the archive which got created just before you carried out this activity?
Unfortunately all of the configuration files were created after the mistake was made.
 
Old 05-05-2015, 12:43 PM   #4
ccj4467
Member
 
Registered: Jan 2009
Posts: 34

Original Poster
Rep: Reputation: 5
Problem solved. Not only did I mix up the ports on the SAS card I had one array hooked to the wrong fileserver.

The real config is 2 identical fileservers with one being the primary and the other the backup.

The way I found this was doing a lvdump and examining the metadata for each disk. It clearly shows the hostname that created the PV's

Thanks for your response T3RM1NVT0R, this lead me to the lvmdump info

Last edited by ccj4467; 05-05-2015 at 12:45 PM.
 
Old 05-05-2015, 01:02 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You're welcome!

Thanks for sharing the solution and marking the thread as solved.

Enjoy Linux!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with RAID MD and LVM! FORCED-INDUCTN Linux - Server 1 04-28-2012 12:35 PM
LVM problems ozric Linux - Software 18 09-18-2006 02:37 PM
Problems using lvm fbenites SUSE / openSUSE 2 07-13-2006 07:46 PM
LVM Problems - Please Help ELEGANCE Linux - Hardware 0 05-02-2006 01:40 PM
LVM Bootscript Problems kvanblijderveen Mandriva 0 07-07-2004 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration