Operating System - HP-UX
1753907 Members
9168 Online
108810 Solutions
New Discussion юеВ

pvcreate disk_size / multiple PVs on one physical disk?

 
SOLVED
Go to solution
Peter Kovacs 1.0rc
Frequent Advisor

pvcreate disk_size / multiple PVs on one physical disk?

Hi,

Please, could someone shed some light on what purpose the "disk_size" parameter to pvcreate is supposed to serve?

Is it to allow creating more than one pv on a single physical disk? If not, is there any other way to create multiple pvs on the same physical disk?

Thanks
Peter
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: pvcreate disk_size / multiple PVs on one physical disk?

Shalom,

HP has put the man pages online.

-s disk_size
Effective size of the physical volume to be created, specified in number of physical sectors.

http://devrsrc1.external.hp.com/STK/cgi-bin/man2html?debug=0&manpage=/usr/share/man/man1m.Z/pvcreate.1m

It is not as cryptic as it may seem. A volume group only has a limited number of Physical Extents to spread on a volume group and newer larger disks require more of them to be distributed to a single disk.

To answer your question, no, it is not to allow the creating of more than one physical volume on a disk.

With LVM a disk can only belong to one volume group. In Linux this limitation was removed when LVM was ported.

Once part of a volume group multiple LOGICAL volumes (partitions) can be partitioned into a disk.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rashid Hamid
Regular Advisor

Re: pvcreate disk_size / multiple PVs on one physical disk?

You cannot assign multiple pvs in one physical disk.
I'm Parit Madirono/Parit Betak Boyz
Mustafa Gulercan
Respected Contributor

Re: pvcreate disk_size / multiple PVs on one physical disk?

hi Peter;
The pvcreate command initializes a direct access storage device (a raw disk device) for use as a physical volume in a volume group.

The operation is denied if pv_path belongs to another volume group. Only physical volumes not belonging to other volume groups can be created.
so you can not create more than one pv on a single physical disk.
if you try to create pv with -f parameter on the same disk, it will create pv but data will lost at the disk.

disk_size ; size of the pv to be created,in number of physical sectors.

regards;
mustafa
Torsten.
Acclaimed Contributor
Solution

Re: pvcreate disk_size / multiple PVs on one physical disk?

Hi,

I'm nor really sure about the "-s" parameter, but IMHO you can shrink a disk device to a smaller size.

Regarding the physical volumes: for 11.23 and newer versions you can create partitions (man idisk), each partition can be a physical volume - so youu can have multiple PVs on the same physical disk.

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!   
Peter Kovacs 1.0rc
Frequent Advisor

Re: pvcreate disk_size / multiple PVs on one physical disk?