1755766 Members
2883 Online
108838 Solutions
New Discussion юеВ

Two VGs over one PV

 
SOLVED
Go to solution
Taurian
Valued Contributor

Two VGs over one PV

Hi everyone,

I wanted to know if it's possible to create two VGs over a single PV? If yes, let me know the procedure. If no, let me know the reason why not. Thanks.
21 REPLIES 21
James R. Ferguson
Acclaimed Contributor

Re: Two VGs over one PV

Hi:

No, a Volume Group can span multiple physical volumes but a single physical volume cannot host more than one volume group. This is the way LVM works.

http://docs.hp.com/en/B2355-60130/lvm.7.html

Regards!

...JRF...
AVV
Super Advisor

Re: Two VGs over one PV

Hello,

You cannoy use a single PV for more than a VG. You can have mutiple path for the same PV but ever and never use that for different VGs.
Michal Kapalka (mikap)
Honored Contributor

Re: Two VGs over one PV

hi,

that is not possible.

mikap
Vishu
Trusted Contributor

Re: Two VGs over one PV

Hi,

I agree with everyone here. It is simply not possible.

and the reason is "LVM dont allow this". This is a feature of Volume Manager.

Thanks
Torsten.
Acclaimed Contributor

Re: Two VGs over one PV

Let's assume you create 2 partitions on 1 disk, each will be handled as a single PV, but this would be highly unsupported.


But it isn't just impossible.


;-)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
SoorajCleris
Honored Contributor

Re: Two VGs over one PV

Hi,

Its possible in Integrity systems , but please avoid going for it. I think now a days disks are cheap .. :)


regards,
sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
SoorajCleris
Honored Contributor
Solution

Re: Two VGs over one PV

Remember when you use the term PV - its not possinble , becaseu if you create PV on different partitions , it become different PV. on the same physical disk if you ask, yes.

here we go ..

# cat sooraj
3
EFI 400MB
HPUX 100%
HPUX 1000MB
[rx26-156]/

======

idisk -f /sooraj -w /dev/rdsk/c15t0d6

insf -eC disk

Ioscan -fnC disk

disk 49 0/4/1/1.109.13.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d6 /dev/rdsk/c15t0d6
/dev/dsk/c15t0d6s1 /dev/rdsk/c15t0d6s1
/dev/dsk/c15t0d6s2 /dev/rdsk/c15t0d6s2
/dev/dsk/c15t0d6s3 /dev/rdsk/c15t0d6s3


# pvcreate -f /dev/rdsk/c19t0d6s2
Physical volume "/dev/rdsk/c19t0d6s2" has been successfully created.
[rx26-156]/

# pvcreate -f /dev/rdsk/c19t0d6s3
Physical volume "/dev/rdsk/c19t0d6s3" has been successfully created.
[rx26-156]/

# diskinfo /dev/rdsk/c19t0d6s3
SCSI describe of /dev/rdsk/c19t0d6s3:
vendor: HP
product id: HSV200
type: direct access
size: 1024000 Kbytes
bytes per sector: 512
[rx26-156]/

# diskinfo /dev/rdsk/c19t0d6s2
SCSI describe of /dev/rdsk/c19t0d6s2:
vendor: HP
product id: HSV200
type: direct access
size: 2759680 Kbytes
bytes per sector: 512
[rx26-156]/


# vgcreate -s 32 vgpart2 /dev/dsk/c19t0d6s2
Volume group "/dev/vgpart2" has been successfully created.
Volume Group configuration for /dev/vgpart2 has been saved in /etc/lvmconf/vgpart2.conf
[rx26-156]/

# vgcreate -s 32 vgpart3 /dev/dsk/c19t0d6s3
Volume group "/dev/vgpart3" has been successfully created.
Volume Group configuration for /dev/vgpart3 has been saved in /etc/lvmconf/vgpart3.conf
[rx26-156]/

# vgdisplay /dev/vgpart2
--- Volume groups ---
VG Name /dev/vgpart2
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 32
Total PE 84
Alloc PE 0
Free PE 84
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 508g
VG Max Extents 16256

[rx26-156]/

# vgdisplay /dev/vgpart3
--- Volume groups ---
VG Name /dev/vgpart3
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 32
Total PE 31
Alloc PE 0
Free PE 31
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 508g
VG Max Extents 16256

[rx26-156]/
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
mogiro
Regular Advisor

Re: Two VGs over one PV

Hi all,
All we are supposing we are talking about creating two different VG over the same PV on THE SAME SYSTEM, but if this PV belongs to a disk array that is showed with no masking restriction to two different systems, then yes, you can use the same PV to create a VG on one system and another VG on the other system. BUT then both systems are going to write on the PV without control and finally they are going to try to write on the same portion of disk at the same time, so your data is going to become corrupted.
So, anyway, never try to do so. I talk with experience...
Taurian
Valued Contributor

Re: Two VGs over one PV

Thank you all for your replies. Sorry to have used the term PV, when I meant that I've been asked to create two VGs on the same "physical disk".

The twist in the matter is that I been given the task to create another VG (say vg01) on the same "physical disk" that has the root VG vg00 on it. vg00 is already present on that disk and HP-UX is up and running. On the leftover space, I've been asked to create the vg01.

Please let me know how to achieve this. Thanks.