LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-10-2012, 04:43 AM   #1
phatrik
LQ Newbie
 
Registered: Sep 2010
Location: Toronto, ON
Distribution: CentOS
Posts: 18

Rep: Reputation: 0
LVMs / pvmove


I was reading about pvmove's ability to move extends from one PV to another (which would be useful, if for an example, a disk drive was starting to show signs of failures). man pages explain you can either move all of the extends on a particular PV or only a specific LV's extends:

Code:
pvmove /dev/sda5 /dev/sdb5
or

Code:
pvmove -n LogVol1 /dev/sda5 /dev/sdb5

Now, playing around in a pretend scenario where I'd only want to move a few select LVs for one reason or another (i.e: the only available PV doesn't have enough space to take all LVs from the failing PV and I'd like to move the most important LVs first) I tried finding out which PV a specific LV is on:

I tried all display and scan commands, each of them with -v, i.e.: lvdisplay, vgdisplay, pvdisplay, lvscan, vgscan and pvscan but nothing seems to specify which PV a specific lv is using.


Which brings two questions:

1. If a VG has multiple PVs assigned to it, how is it decided which PV is used when an LV is created?

2. How do I determine the PV being used for a specific LV? Of course, this question assumes there are multiple PVs assigned to the VG



TIA
 
Old 08-10-2012, 08:47 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
With the lvdisplay and pvdisplay options you can use -v to get somewhat more verbose information. -vv to get even more vebose, -vvv to get yet more etc...
 
Old 08-17-2012, 01:55 AM   #3
phatrik
LQ Newbie
 
Registered: Sep 2010
Location: Toronto, ON
Distribution: CentOS
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MensaWater View Post
With the lvdisplay and pvdisplay options you can use -v to get somewhat more verbose information. -vv to get even more vebose, -vvv to get yet more etc...

Thank you for your reply, unfortunately turning up the verbosity level with additional "v"s didn't help.
 
Old 08-18-2012, 01:12 PM   #4
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248
Blog Entries: 3

Rep: Reputation: 17
First check the whole information about the lvm

try all these command it may help you to understand.

pvdisplay -m (It gives the information about the disk, if disk is add in a vg then vgname also)

vgdisplay -vv (Number of disk add in the VG & how much PE is used from the each disk & how much PE free)

lvdisplay -M /dev/mapper/vg/lv (It gives the full information about the PV VG & LV of that particular lv)

#pvs (pv & vg name pvfree)

#vgs (pv & lv information vgfree)

#lvs (lv & vg lvmsize)
 
  


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
mounting old disk on new system with duplicate LVMs deesto Linux - Server 2 10-22-2008 07:28 PM
Extending filesystems/LVMs in linux hondo Linux - General 1 02-28-2008 02:55 PM
Manage LVMs (no GUI) Notwerk Linux - Software 2 01-10-2006 08:32 AM
Swap Files and LVMs moxieman99 Fedora - Installation 4 11-15-2005 05:07 PM
How do you use and configure LVMs? bondsteveg Linux - Newbie 2 04-14-2005 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:46 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