LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2006, 03:47 PM   #1
osiosi
LQ Newbie
 
Registered: Jun 2006
Posts: 9

Rep: Reputation: 0
Question lvdisplay -v doesn't diplay detail LV info


I have DELL system running 2.6.9-34.ELsmp with system-config-lvm-1.0.16-1.0 & lvm2-2.02.01-1.3.RHEL4 intalled when I try to run lvdisplay -v on any LV it will only display short description I am looking for the info about the PV's that a particular LV is using.



thanks
 
Old 06-27-2006, 04:07 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,160

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
LV's are created from VG's, and VG's may span multiple PV's. So a given LV may have parts on one PV, and parts on another (but an LV can only be in one VG, and a PV can only be in one VG). There is no command to tell you what PV's a given LV is spread across, as far as I know.

You can use the pvmove command to free up a PV for a subsequent vgreduce, if that's your intent.

Check out pvdisplay and vgdisplay in addition to lvdisplay. Also the shorter summary versions of these: pvs, vgs, and lvs.

To find the commands available with LVM, run "ls /sbin/pv*; ls /sbin/vg*; ls /sbin/lv*" You might get a few extra non-LVM commands listed in the output, but probably not too many (if any at all). You can then read the manpages on each of these commands to see if one might provide info that would be of use to you.
 
Old 06-27-2006, 04:15 PM   #3
osiosi
LQ Newbie
 
Registered: Jun 2006
Posts: 9

Original Poster
Rep: Reputation: 0
Question

Well I have another Dell system which is running Redhat AS 3, and it returns complete info of an LV when lvdipslay -v is run against meaning it gives all the extent info from which PV they are coming from to form that LV. So I am confuse redhat AS 3 returns lvdisplay -v the way it should and redhat EL4 deosn't give me details from where the extents are coming. Even though redhat EL4 is newer and it is running with 2.6 kernel.
 
Old 06-27-2006, 04:33 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,160

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by osiosi
... it returns complete info of an LV when lvdipslay -v is run against meaning it gives all the extent info from which PV they are coming from to form that LV.
Interesting. I've never seen that. Maybe if your LV does NOT span multiple PV's then you don't see this info listed, but if it DOES span multiple PV's then you do? Could it be that I've never spanned PV's with any of my LV's and thus have never seen the output you describe?

Here is some example lvdisplay output for a filesystem that I've extended a time or two, but never spanned PV's. I'd like to see an example of the output you receive showing the LV/PV relationships that I'm missing, just for the learning experience.
Code:
# lvdisplay -v /dev/vg_linux/var
    --- Logical volume ---
  LV Name                /dev/vg_linux/var
  VG Name                vg_linux
  LV UUID                2MvMBz-BQcq-e1cn-dnp2-osra-A5d4-1cb980
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.49 GB
  Current LE             381
  Segments               2
  Allocation             inherit
  Read ahead sectors     0
  Block device           254:4

  Using logical volume(s) on command line
# lvdisplay --version
  LVM version:     2.01.14 (2005-08-04)
  Library version: 1.01.05 (2005-09-26)
  Driver version:  4.4.0
#

Last edited by haertig; 06-27-2006 at 04:34 PM.
 
Old 06-27-2006, 04:48 PM   #5
osiosi
LQ Newbie
 
Registered: Jun 2006
Posts: 9

Original Poster
Rep: Reputation: 0
This is an example from Redhat AS 3 2.4 Kernel (THIS LV only spans on one PV)
lvdisplay -v /dev/vg00/home|more
--- Logical volume ---
LV Name /dev/vg00/home
VG Name vg00
LV Write Access read/write
LV Status available
LV # 1
# open 1
LV Size 3.91 GB
Current LE 125
Allocated LE 125
Allocation next free
Read ahead sectors 1024
Block device 58:0

--- Distribution of logical volume on 1 physical volume ---
PV Name PE on PV reads writes
/dev/cciss/c0d0p10 125 897748 289016

--- logical volume i/o statistic ---
897748 reads 289016 writes

--- Logical extents ---
LE PV PE reads writes
00000 /dev/cciss/c0d0p10 00000 101 159145
00001 /dev/cciss/c0d0p10 00001 1643 9588
00002 /dev/cciss/c0d0p10 00002 0 0
00003 /dev/cciss/c0d0p10 00003 0 0
00004 /dev/cciss/c0d0p10 00004 11624 890
00005 /dev/cciss/c0d0p10 00005 0 0
00006 /dev/cciss/c0d0p10 00006 0 0
00007 /dev/cciss/c0d0p10 00007 0 0
00008 /dev/cciss/c0d0p10 00008 4204 1150
00009 /dev/cciss/c0d0p10 00009 0 0
00010 /dev/cciss/c0d0p10 00010 0 0
00011 /dev/cciss/c0d0p10 00011 0 0
00012 /dev/cciss/c0d0p10 00012 4817 852
00013 /dev/cciss/c0d0p10 00013 0 0
00014 /dev/cciss/c0d0p10 00014 0 0
00015 /dev/cciss/c0d0p10 00015 0 0
00016 /dev/cciss/c0d0p10 00016 15307 453
00017 /dev/cciss/c0d0p10 00017 363 0


This is from RedHat EL4 2.6Kernel (This LV also Span on one PV as well)
lvdisplay -v /dev/VolGroup00/test
Using logical volume(s) on command line
--- Logical volume ---
LV Name /dev/VolGroup00/test
VG Name VolGroup00
LV UUID R58MRh-urDO-sJzY-28Vg-fd5t-12oM-afDua3
LV Write Access read/write
LV Status available
# open 1
LV Size 64.00 MB
Current LE 2
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:4
 
Old 06-27-2006, 04:55 PM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,160

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Well, your system is definitely more detailed in it's lvdisplay output than mine! Personally I've never seen this level of detail displayed, so I can't tell you why you're not getting it. If you figure it out please post the solution back to this thread. Not that I need this detail, but it's cool that it's available - at least under some circumstances or some distro/OS versions.
 
Old 06-28-2006, 12:03 PM   #7
osiosi
LQ Newbie
 
Registered: Jun 2006
Posts: 9

Original Poster
Rep: Reputation: 0
I still need help, can some one solve this mystery.


Thanks
 
  


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
Getting best diplay out of Emachine T3302 DJOtaku Linux - Hardware 2 05-20-2006 09:40 PM
setting diplay sli issue pinelands Linux - Newbie 3 01-02-2006 10:54 AM
Can't get Kmail to diplay HTML emails Stevetgn Linux - Software 1 06-10-2005 06:40 PM
need C code to diplay text in Glade skie_knite007 Programming 1 02-13-2005 06:03 AM
Mosixview diplay errors jbkerr Linux - General 0 01-28-2002 09:33 AM


All times are GMT -5. The time now is 03:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration