Operating System - HP-UX
1754368 Members
4791 Online
108813 Solutions
New Discussion

Re: script to create /etc/lvmpvg file

 
SOLVED
Go to solution
rleon
Regular Advisor

script to create /etc/lvmpvg file

Hi everyone ..

 

Just wondering if  anyone have a script that creates / appends the /etc/lvmpvg file for a specfic vg that is already created?


Thanks

 

 

 

2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: script to create /etc/lvmpvg file

Hi:

 

I don't have a script to create an '/etc/lvmpvg' file or its stanzas after the fact.  If you are creating a volume group from scratch, simply use the '-g pvg_name' option of 'vgcreate' to form the entry.  Otherwise, you can create the 'lvmpvg' by-hand after the fact from the physical volumes that comprise your volume group, using 'vgdisplay -v'.

 

See the manpages for 'lvmpvg(4)' and 'vgcreate(1M)' for more information.

 

Regards!

 

...JRF...

Michael_Pelleti
Occasional Advisor

Re: script to create /etc/lvmpvg file

It can't really be automated, since you're the one who has to decide what disks go in which PVGs, right?  Maybe it should be a feature request for the pvchange command - pvchange -g PVG1 /dev/dsk/c0t0d0, right?

 

/etc/lvmpvg is a very simple file to edit, though.

 

VG<tab>/dev/vg00

PVG<tab>GROUPNAME

/dev/dsk/c0t0d0

/dev/dsk/c0t1d0

 

The key is that the white space between the VG and PVG keys and their values must be a single tab. Spaces won't work.