[CentOS] mounting lvm2

Sat Sep 3 13:22:13 UTC 2016
Alice Wonder <alice at domblogger.net>

CentOS 7 for everything

I am probably never using lvm again. I have never not once actually 
benefited from its capabilities but this is probably the third or fourth 
time it has gotten in my way.

Issue is that I use the tools so rarely that I can't recall what needs 
to be done to properly mount the drives on another system and finding 
that info on the web is becoming more difficult as the noise in search 
results increases, more and more results are damn youtube videos, and my 
eyes are deteriorating. So its just fixed ext4 for me in the future, KISS.

End of rant. PC mobo died. Most data I need from it backed up to github, 
few things done that day didn't make the last commit and I'd rather not 
do them again.

Trying to mount drive on my laptop via USB interface. Which is easy when 
drives are plain old ext4 and not ext4 sitting on top lvm2.

* end frustrated rant *

[root at localhost ~]# vgs
   VG     #PV #LV #SN Attr   VSize   VFree
   centos   1   3   0 wz--n- 111.30g    0
   centos   1   3   0 wz--n- 223.08g    0
[root at localhost ~]# vgscan
   Reading all physical volumes.  This may take a while...
   Found volume group "centos" using metadata type lvm2
   Found volume group "centos" using metadata type lvm2
[root at localhost ~]#

[root at localhost ~]# pvdisplay /dev/sdb2
   --- Physical volume ---
   PV Name               /dev/sdb2
   VG Name               centos
   PV Size               111.30 GiB / not usable 4.00 MiB
   Allocatable           yes (but full)
   PE Size               4.00 MiB
   Total PE              28492
   Free PE               0
   Allocated PE          28492
   PV UUID               mnFTy9-PoVX-paaA-iBML-kXh5-1Zk5-PQTPW1

[root at localhost ~]#

That's the volume that I need to mount, it is in a VG named centos which 
is the same VG name as what the laptop I am using uses.

I have created /mnt/tmp which is where I want to mount it.

I am a bit worried both having the same VG name (centos) may be an 
issue, I believe the next step is suppose to be to use vgchange to 
activate the volume group but I am a bit hesitant to issuing that 
command with an argument that includes a volume group that is already 
active.

There is only one physical disc in the volume I need to mount, that was 
a lesson I learned the hard way previously - don't use multiple disks in 
a LVM2 volume without hardware redundancy. And with today's disk sizes 
it really isn't needed, not for what I do.

Where do I go from here to mount that volume?

Thanks.



-- 
-=-
Sent my from my laptop, may not be able to respond timely