LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 05-11-2012, 10:17 AM   #1
Foobsy
LQ Newbie
 
Registered: Dec 2011
Posts: 7

Rep: Reputation: Disabled
Moving existing VG to multipath devices


I have a RHEL 4.4 system that has been set-up incorrectly.

The disk storage is provided by an IBM SAN using IBM SDD multipath software. The system can see 4 paths to each LUN, i.e. /dev/sda, /dev/sdb, /dev/sdc and /dev/sdd are 4 paths to a single LUN. Each LUN also has a multipath device associated with it, i.e. /dev/vpatha.

Whoever built the volume group for data has not used the multipath device /dev/vpatha as a physical volume, but instead used /dev/sda. This does not give any resilience if that path goes off-line. The UUID of the 4 paths is recognized as being the same.

Is there a way to change the volume group to use the multipath devices instead of the single path devices without having to re-build?

The volume group is not a boot device, it is where the application / database data is stored.

Thanks,
 
Old 05-11-2012, 09:56 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
I think your problem is mainly one of LVM filtering ("filter =" in /etc/lvm/lvm.conf).

LVM is probably seeing the /dev/sda device before it sees the /dev/vpatha device so that is what it is using.

(BTW, the devices you see in the files in /etc/lvm/archive and /etc/lvm/backup are just what they say. They're hints. LVM works off the metadata written to each block device it controls. Since /dev/sda, /dev/sdb, /dev/sdc, /dev/sdd and /dev/vpatha are really all the same device, the metadata is the same.)

You should be filtering out at least the underlying "/dev/sd" devices. There are good comments in /etc/lvm/lvm.conf.

My guess is you have the default filter.
Code:
    # By default we accept every block device:
    filter = [ "a/.*/" ]
If that's the case, you could probably get away with
Code:
filter =[ "r|/dev/sda|", "r|/dev/sdb|", "r|/dev/sdc|", "r|/dev/sdd|" ]
When you do a 'pvscan -vvv' you need to see somewhere in the output this
Code:
      /dev/sda: Skipping (regex)
      /dev/sdb: Skipping (regex)
      /dev/sdc: Skipping (regex)
      /dev/sdd: Skipping (regex)
Hope this helps.
 
1 members found this post helpful.
Old 05-14-2012, 04:57 AM   #3
Foobsy
LQ Newbie
 
Registered: Dec 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for the reply - I've checked my filter setting in lvm.conf and it does appear to be wrong.

I have;
filter = [ "a/.*/" ]
filter = [ "r/sd.*/", "a/.*/" ]

My devices are sda, sdb etc. not sd.a sd.b so the second line is not working because it is wrong.

I'll get this updated and run a pvscan. I presume for a pvscan I'b be better with filesystems unmounted and applications stopped? Is pvscan destructive?
 
Old 05-14-2012, 07:41 AM   #4
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
No, 'pvscan' is not destructive. It simply reads the metadata off of all of the eligible devices. I'm not altogether sure what LVM would do in this case. But if you can stop your applications, and umount the filesystems as you mentioned, it would be safer.

You could also do a 'vgchange -an <vgname>' before you do your 'pvscan', with a 'vgscan' and a 'vgchange -ay <vgname>' afterwards just to make sure you pick up the new PVs used by that volume group. ('pvscan -v3' will tell you what it's "thinking".)

In terms of your lvm.conf, you should only have one uncommented filter statement. Right now, the last one encountered is the one that is used, so you're safe; but I'd comment out that first one just to be consistent with the comments in lvm.conf:
Quote:
# Don't have more than one filter line active at once: only one gets used.

# Run vgscan after you change this parameter to ensure that
# the cache file gets regenerated (see below).
# If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
Good luck with the change.
 
Old 05-15-2012, 08:07 AM   #5
Foobsy
LQ Newbie
 
Registered: Dec 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
https://access.redhat.com/knowledge/solutions/47894
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Multipath devices not showing up gunnerjoe Linux - Hardware 1 02-20-2012 03:20 PM
Mapping LUNs to multipath devices. larold Linux - Enterprise 9 02-20-2010 11:31 AM
Moving an Existing Installation dudeman41465 Linux - General 1 09-13-2006 04:30 PM
Moving existing install to new fs type daboochmeister Linux - General 1 06-18-2006 12:15 PM
Moving existing directory to new partition? chris8myshoe Linux - General 3 02-04-2004 08:48 PM


All times are GMT -5. The time now is 11:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration