LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-26-2010, 04:31 PM   #1
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
Multiple Logical Groups out of a Physical Volume


How to create multiple Logical Groups out of a single Physical Volume?

Here is the Physical Volume I have created:

Code:
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda9
  VG Name               myVG1
  PV Size               54.88 MB / not usable 2.88 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              13
  Free PE               11
  Allocated PE          2
  PV UUID               bon4Ao-vmgC-aP1h-EC9X-w3tN-YXNu-0N2dAw
This is how I am creating a Logical Group out of the above Physical Volume:

Code:
# vgcreate myVG1 -s 4m /dev/sda9
Display:

Code:
# vgdisplay
  --- Volume group ---
  VG Name               myVG1
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               52.00 MB
  PE Size               4.00 MB
  Total PE              13
  Alloc PE / Size       2 / 8.00 MB
  Free  PE / Size       11 / 44.00 MB
  VG UUID               O6ljYC-bflz-EUTd-nf34-8gYe-Fh39-Bh3cOg
But I am unable to create one more Logical Group out of this Physical Volume.

Can we accomplish it? Or do we always extend our current Logical Group to utilise the available space of a Phyiscal Volume?
 
Old 04-26-2010, 06:42 PM   #2
samborambo
LQ Newbie
 
Registered: Dec 2004
Location: New Zealand
Distribution: Ubuntu LTS
Posts: 10

Rep: Reputation: 0
Physical Volumes (PVs) are allocated to whole devices only. VGs require at least one whole PV. If you want more than on VG you need a PV for each. The solution is to partition sda with 2 partitions. You can have a maximum of 16 partitions on one physical device using logical partitions.

Although the whole point of using LVM is that you don't need partitions. Wouldn't it be simpler if you convert your other partitions to LVs and just use the entire drive as a PV and VG?

Sam.
 
Old 04-26-2010, 08:31 PM   #3
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by samborambo View Post
Physical Volumes (PVs) are allocated to whole devices only. VGs require at least one whole PV. If you want more than on VG you need a PV for each. The solution is to partition sda with 2 partitions. You can have a maximum of 16 partitions on one physical device using logical partitions.

Although the whole point of using LVM is that you don't need partitions. Wouldn't it be simpler if you convert your other partitions to LVs and just use the entire drive as a PV and VG?

Sam.

Yes, I think your point is right. I confirmed from some UNIX Admin here in my project / office and he also told me that only one VG can be created out of a PV.

Actually, one of my colleagues here told me that we could achieve what I asked in the question, but that is not practical.

Thanks for your views!
 
  


Reply



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
How to find Physical Volumes associated with a Logical Volume Group mghiya Programming 3 09-27-2013 07:59 AM
When to use multiple LVM Volume Groups koenigj3 Linux - Newbie 11 02-04-2010 06:20 PM
LVM: How to create logical (physical) volume with extent sie 32 Mb consistgd Linux - Software 4 11-14-2006 05:03 PM
single logical partion on multiple physical drives frieza Linux - Software 0 12-23-2003 04:48 PM
Logical Volume Groups concoran Linux - General 3 06-03-2001 06:29 AM

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

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