1832994 Members
2185 Online
110048 Solutions
New Discussion

Re: New to lvm

 
SOLVED
Go to solution
katie1
Frequent Advisor

New to lvm

on a test system i installed ux 11.xx

regarding LVM ... Is there a command to find all unused available physical discs in all vgs

or is one vg queried at a time

what is command to be used

is there a command to pvcreate multiple discs at once

or is pvcreate done one disk at a time


what is command to be used



when i find the free disks i want to create a VG so it can be used

these steps required



i have read docs on how to expand extend etc but i need info to start from scratch..preferably step by step,



feel free to answer in multiple posts as points will be asssigned to each post,,

regards KT1
11 REPLIES 11
Torsten.
Acclaimed Contributor

Re: New to lvm

Your questions are all very general, never specific.

>> on a test system i installed ux 11.xx

xx does matter!



You should use "vgdisplay -v ..." and "pvdisplay -v ..." to get this information.



Time to study the guides about LVM and hp-ux system administration!


http://www.hp.com/go/bsc

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!   
Torsten.
Acclaimed Contributor

Re: New to lvm

Point to start:

http://docs.hp.com/en/5992-6576/index.html

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!   
James R. Ferguson
Acclaimed Contributor
Solution

Re: New to lvm

Hi:

The manpages for 'lvm(7)' offer a very good, quick overview of LVM commands, LVM concepts and some LVM examples:

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02261079/c02261079.pdf

Regards!

...JRF...
katie1
Frequent Advisor

Re: New to lvm


unfortunately the questions are not specific as i am not well versed in the subject to ask precise questions ,
I do understand that can make it a little difficult to answer thanks to all, replies just what i needed a guide with examples

regards KT1

Steven E. Protter
Exalted Contributor

Re: New to lvm

Shalom,

Normally this is done via a simple script:

bdf | awk -F\/ '{ print $3 }' | sort -u |while read -r vgname
do
vgdisplay -v $vgname
done

You may need to hack at this a bit, but you can easily find the values you seek.

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
katie1
Frequent Advisor

Re: New to lvm


Thanks for the links,,much appreciated

As we speak i am reading Certified System Administrator by Ghori Ashgar which is good imho,,


i installed ux 11.31 on a rx2600

UX is installed on vg001 containing using one disk



I have read a few guides including the the most recent one posted by James but i cannot find answers to the queries below yes i have tried man pvcreate , and man vgdisplay etc,

but these options do not seem apparent,to me.



regarding LVM ... Is there a single command to find "all unused available physical discs in "all vgs" ?

or is one vg queried at a time i know how to query 1 vg at a time



is there a command to pvcreate multiple discs at once i know how to do one at a time

anyguide i have read so far seems to omit the above information perhaps there is no such option ?? or am I missing //misunderstanding something

regards kT1
katie1
Frequent Advisor

Re: New to lvm

shalom Sep, just read your response , will wrangle with that ,

regards
KT1
James R. Ferguson
Acclaimed Contributor

Re: New to lvm

Hi (again):

> UX is installed on vg001 containing using one disk

Standards dictate that the operating system boot disk in HP-UX is named 'vg00'. Use other volume groups for non-OS data. By keeping vg00 devoid of anything other than the standard HP-UX logical volumes you can easily backup and/or recover (with Ignite) and/or clone (with Ignite) your operating system.

> regarding LVM ... Is there a single command to find "all unused available physical discs in "all vgs" ?

Yes, "documentation". Aside from some more advanced methods to look for LVM metadata on a physical disk, you can't be sure of what constitutes "unused" physical volumes.

> or is one vg queried at a time i know how to query 1 vg at a time

Interrogating a volume group can show available extents within the physical volumes that comprise it but doesn't tell you about "unused" physical volumes on the server. Documentation does.

> is there a command to pvcreate multiple discs at once i know how to do one at a time

No, one 'pv_path' argument per 'pvcreate' is allowed as the manpages show. You can, however, do something as simple as:

# for DISK in c1t0d0 c1t1d0 c1t2do
> do
> pvcreate /dev/rdsk/${DISK}
> done

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: New to lvm

Hi (again):

If you parse the output of 'bdf' you will constrain yourself to seeing only volume groups with *mounted* filesystems on their logical volumes.

A much better way to interrogate active volume groups is:

# vgdisplay

or:

# vgdisplay -v

...without any further argument.

Regards!

...JRF...
katie1
Frequent Advisor

Re: New to lvm

Thank you all that certainly cleared things up nicely ,
and is certainly appreciated,

regards
KT1
katie1
Frequent Advisor

Re: New to lvm

solution provided..thanks all