Operating System - HP-UX
1850508 Members
2439 Online
104054 Solutions
New Discussion

Re: Creating a volume group ....

 
SOLVED
Go to solution
Manuales
Super Advisor

Creating a volume group ....

Hi ..
i need to create a vg ... how can i do that?
after that
i need to create lv's ...how can i do that?
after that
i need to activate vg's and lv's .. how can i do that?

and after that
how can i mount all that lv's?

Regards.
7 REPLIES 7
Patrick Wallek
Honored Contributor
Solution

Re: Creating a volume group ....

Read the documentation.

To create a VG use the command vgcreate

To create an LV use the command lvcreate

To activate a VG use the command vgchange

To mount the first time use the command mount
To mount when the system reboots you must modify /etc/fstab.

Each of those commands has a man page that you should review.

Other useful documentation is available here:

From the "Managing Systems and Workgroups: A Guide for HP-UX System Administrators" manual available here:
http://docs.hp.com/en/B2355-90950/index.html

Have a look at "Chapter 6 Administering a System: Managing Disks and Files":
http://docs.hp.com/en/B2355-90950/ch06.html

If you would rather have the manual in a PDF file:
http://docs.hp.com/en/B2355-90950/B2355-90950.pdf

Manuales
Super Advisor

Re: Creating a volume group ....

how can i see free space on disk?

for using vgcreate .. how can i know if some disk is free for being used?

Thanks.
James R. Ferguson
Acclaimed Contributor

Re: Creating a volume group ....

Hi Manuales:

> how can i see free space on disk?

You can use 'vgdisplay vgname' to determine the in-use (allocated) and free disk extents available in a volume group. A 'pvdisplay /dev/dsk/cXtYdz' shows the allocated and free extents on a physical volume.

> for using vgcreate .. how can i know if some disk is free for being used?

You cannot execute 'vgcreate' using a physical disk that is already a part of a volume group. Physical disk that are part of a volume group are recorded in '/etc/lvmtab'. The absence of a physical disk from '/etc/lvmtab' or from the devices listed when doing 'vgdisplay -v' *_may_* mean that the physical disk is free to use. Only good documentation guarantees that the disk is truly re-usable, though, since the physical disk may be being used as a raw device or it may have been 'vgexport'ed, thereby removing it from a volume group recorded in the '/etc/lvmtab'.

Regards!

...JRF...
Cem Tugrul
Esteemed Contributor

Re: Creating a volume group ....

Hi Manuales,
Here are some useful docs...
Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Cem Tugrul
Esteemed Contributor

Re: Creating a volume group ....

another doc..
Good luck,
Our greatest duty in this life is to help others. And please, if you can't
Yogeeraj_1
Honored Contributor

Re: Creating a volume group ....

hi manuales,

If you are not at ease with the command line options, i would prefer to use SAM instead.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Geoff Wild
Honored Contributor

Re: Creating a volume group ....

lvmtab is a binary file - therefore use strings to look at it - never edit it with vi:

strings /etc/lvmtab |grep cXtXdX

or

strings /etc/lvmtab > /tmp/lvmtab.out

Then view or more /tmp/lvmtab.out and look for cXtXdX disk

Another way (if all vg's are activated):

vgdisplay -v |grep cXtXdX

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.