LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-19-2013, 09:46 AM   #1
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Rep: Reputation: 42
creating volume groups


I just wanted to know if you can create a volume group(VG) from an existing logical volume (LV)?

I wanted to create another volume group with different extents, then create another logical volume with specified extents.

I have search the net far and wide but cant seem to find anything, all vgcreation come from PV.

I tried it and it works, but just wanna know if this is correct..

vgcreate -s 2300 newVG /dev/mapper/existing_LV

then :

lvcreate -l 40 -n better_LV newVG

Last edited by cbtshare; 03-19-2013 at 09:48 AM.
 
Old 03-19-2013, 11:08 AM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
http://www.howtoforge.com/linux_lvm

http://www.centos.org/docs/5/html/Cl...olume_Manager/

http://www.centos.org/docs/5/html/De...US/ch-lvm.html

hope those get you started. im not skilled enough to answer directly, but google is my friend.
 
Old 03-19-2013, 08:24 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Basically this ' all vgcreation come from PV.' is correct.
You have to build from the ground up ie PEs (physical disk) go into a pool called a VG, then you can split the content of that poll into 1 or more LVs.
Same principle as RAID; you go from disks => RAID sets.

http://tldp.org/HOWTO/LVM-HOWTO/
 
Old 03-19-2013, 10:03 PM   #4
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Original Poster
Rep: Reputation: 42
I am not sure, about that though, because suppose I need to create another VG(volume group) or change the existing extents of the already created volume group then I have to add more Physical Volumes..I dont think so....I understand I can change the VG details, but suppose I need to divide up an existing VG which was already created into a LV, I think you should be able to Volume groups from Logical Volumes..

as I stated the below commands work, and they are precisely the reason why one would need to create another VG with different extents from a LV thats there.I am just not sure why I dont see anything on the internet about creating volume groups from logical volumes.


vgcreate -s 2300 newVG /dev/mapper/existing_LV

then :

lvcreate -l 40 -n better_LV newVG


ALSO:a very important is that you can create(Lv) logical volumes from other (LV)logical volumes, you dont only create (LV)logical volumes from (VG)volume groups only.Unless it is initial..PV added to VG then VG added to the LV.

Last edited by cbtshare; 03-19-2013 at 10:18 PM.
 
Old 03-19-2013, 10:40 PM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Original Poster
Rep: Reputation: 42
# vgs

VG #PV #LV #SN Attr VSize VFree
VolGroup 1 3 0 wz--n- 148.56g 0
my_vg 4 2 0 wz--n- 74.49g 60.82g <---first created volume group from PV
newVG 1 1 0 wz--n- 11.70g 10.92g <---second created volume group from the Logical volume

# pvscan -v

Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/sdb1 VG my_vg lvm2 [10.00 GiB / 0 free]
PV /dev/sdb2 VG my_vg lvm2 [10.00 GiB / 6.33 GiB free]
PV /dev/sdb3 VG my_vg lvm2 [10.00 GiB / 10.00 GiB free]
PV /dev/sdb4 VG my_vg lvm2 [44.49 GiB / 44.49 GiB free]
PV /dev/my_vg/my_lv VG newVG lvm2 [11.70 GiB / 10.92 GiB free] <---created a new volume group from logical volume (/dev/mapper/my_vg-my_lv) , but it shows it as a PV
PV /dev/sda2 VG VolGroup lvm2 [148.56 GiB / 0 free]
Total: 6 [234.75 GiB] / in use: 6 [234.75 GiB] / in no VG: 0 [0 ]
 
Old 03-21-2013, 01:30 AM   #6
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Original Poster
Rep: Reputation: 42
hmm..**sighs ..I guess nobody knows..oh well
 
  


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
Volume Groups and LUN's Linux_Kidd Linux - Server 2 11-08-2012 10:11 PM
When to use multiple LVM Volume Groups koenigj3 Linux - Newbie 11 02-04-2010 07:20 PM
differentiating Volume Groups Vanyel Linux - Server 1 07-01-2009 02:09 PM
No volume groups found jawad512 Linux - Newbie 7 01-01-2009 08:52 PM
Logical Volume Groups concoran Linux - General 3 06-03-2001 07:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration