Operating System - HP-UX
1832489 Members
4617 Online
110043 Solutions
New Discussion

Re: how to extend pv max size?

 
reghpux
Occasional Advisor

how to extend pv max size?

hi:

i have a vg, max pv is 16. but i should add

new pv to this vg to extend diskspace.

what should i do?
17 REPLIES 17
Pete Randall
Outstanding Contributor

Re: how to extend pv max size?

Unfortunately, the only way to do this is at vgcreate time. This means that you will have to re-create your vg and then reload your data.


Pete

Pete
Slawomir Gora
Honored Contributor

Re: how to extend pv max size?

Hi,

in my opinion there is no posibility to change
max pv - you have to backup your data, delete
vg, create new with vgcreate -p max_pv and
restore data.
Franky_1
Respected Contributor

Re: how to extend pv max size?

Hi,

1.) backup your data
2.) delete old vg
3.) create new vg with
"vgcreate -p (range from 1 to 255)
4.) restore your data

Regards

Franky
Don't worry be happy
Geoff Wild
Honored Contributor

Re: how to extend pv max size?

No way to do this on the existing vg...

Others have shown you a way by backing up....if you have more disks, maybe create a new vg

What you can do is:

create a new vg:

XX - vg number
HH - minor number in HEX

mkdir /dev/vgXX
mknod /dev/vgXX/group c 64 0xHH0000

vgcreate -s 8 -p 128 /dev/vgXX

Add the new disks to this VG

vgextend /dev/vgXX /dev/dsk/cCCtTTdDD /dev/dsk/cCCtTTdDD (etc)

create your lvols...

Temporary mount them, then copy from old to new:

vxdump -0 -f - -s 1000000 -b 16 /oracle | (cd /zmnt/oracle ; vxrestore rf -)

Do for each lvol/file system.

Then unmount all of them, change your fstab to the new vg, mount them, then remove the old vg...

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.
Fabio Ettore
Honored Contributor

Re: how to extend pv max size?

Hi,

it is only possible at the moment of the creation of volume group. Then follow the steps as already suggested by backup, recreate vg and restore.
The good option of vgcreate is -p, see man vgcreate for further details.

Best regards,
Fabio
WISH? IMPROVEMENT!
reghpux
Occasional Advisor

Re: how to extend pv max size?

Thanks a lot for above!

I want to do follow,but no test:

1.vgexport backup vg.

2.create a new vg (with same vgid)

4.vgimport all old pv to vgnew.

5.and then mount old lv

what about it?
reghpux
Occasional Advisor

Re: how to extend pv max size?

Thanks a lot for above.

i want to do follow steps,but no test:

1.vgexport old vg (backup)

2.vgexport old vg (delete)

3.vgcreate (same vgid as old vg)

4.vgimport (old vg pv)

what about?Please Reply.I want to know.
Patrick Wallek
Honored Contributor

Re: how to extend pv max size?

You can't do that. The vgcreate will wipe out any existing information that you have on those disks.

When working with VG's you can either vgcreate OR vgimport, NOT both.
Geoff Wild
Honored Contributor

Re: how to extend pv max size?

Don't think you can set the VGID with vgcreate...

However, you could use the vgcgid command:

vgexport the original volume group

Change the VGID on the original disks.
vgchgid /dev/rdsk/c0t0d0 /dev/rdsk/c0t0d1 /dev/rdsk/c0t0d2

re-create the volum group

Then vgimport those disks...

Then vgextend the new disk...

MAKE SURE YOU HAVE A GOOD BACKUP FIRST!

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.
reghpux
Occasional Advisor

Re: how to extend pv max size?

hi,

i create new vg with new pv first.

vgcreate /dev/vgdata /dev/dsk/cxtxdx(new)

vgimport /dev/vgdata /dev/dsk/cxtxdx(old)

how about?
Pete Randall
Outstanding Contributor

Re: how to extend pv max size?

The vgcreate and vgimport commands are mutually exclusive. If you were goint to vimport the steps would be to make the directory (mkdir /dev/vgNN) then create the device file (mknod /dev/vg01/group c64 0xNN0000).


Pete

Pete
Bharat Katkar
Honored Contributor

Re: how to extend pv max size?

Hi,
I think vgexport/vgimport is not the way for your problem.
You have to recreate the VG with vgcreate and the -p option.

1. Backup all the FileSystems on your VG
2. Note down the LV structure manually ( to ease your LV/Filesystem Creation )
3. vgexport vg (Removes VG)
3. vgcreate -p
4. lvcreate
5. newfs
6. Restore

This way it shoudl work.
Regards,



You need to know a lot to actually know how little you know
reghpux
Occasional Advisor

Re: how to extend pv max size?

it looks that i have to recreate vg.

if i want to bakcup filesystem,

what about user vxdump ?

and who can tell me if it is efficient tool?
Carlo Corthouts
Frequent Advisor

Re: how to extend pv max size?

How big is your vg that you want to backup?

Might as well use fbackup to backup everything to tape or if you are using dp just make a filesystem backup of the filesystems created under this vg.

Regards,
Sanjay_6
Honored Contributor

Re: how to extend pv max size?

Here is a comparison of the backup tools / utilities. The call for any specific backup tool has to be yours, depending on how comfortable you are with that.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/5187-2216/5187-2216_top.html&con=/hpux/onlinedocs/5187-2216/00/00/56-con.html&toc=/hpux/onlinedocs/5187-2216/00/00/56-toc.html&searchterms=fbackup%7cvxdump&queryid=20040901-094904

Hope this helps.

regds
reghpux
Occasional Advisor

Re: how to extend pv max size?

my vg has only one lv,and so has

only one filesystem.

Thanks
Bharat Katkar
Honored Contributor

Re: how to extend pv max size?

HI,

Since you have to backup a single FileSystem then i think FBACKUP should not be a problem. FBACKUP allows to backup files larger than 2 GB so that is also not a problem.

Other advantages that comes with fbackup are:
..Medium Tape utilisation
..Support on other UNIX platforms
..Multiple backups on single tape
..backup verification
..File Selection from different directories
..Use of extended file attributes

Well assuming your filesystems is mounted on /mnt the command would go in this way:

# fbackup -v -f /dev/rmt/0m -i /mnt

Where /dev/rmt/0m is your backup device also you can exclude any unnecessary files/directories from /mnt using -e option at the end of the command.

Hope that helps.
Regards,
You need to know a lot to actually know how little you know