Operating System - HP-UX
1827328 Members
5833 Online
109962 Solutions
New Discussion

copy data on vg with lots of disks

 
SOLVED
Go to solution
Douglass A Anderson
Frequent Advisor

copy data on vg with lots of disks

I have hpux11i and I want to copy data from one set of disks to another.
I successfully
vgextend vgname disk1
lvextend -m 1 lv1 disk1
lvreduce -m 0 lv1 disk2
vgreduce vgname disk2
-------------------------
my issue is with a log of disks I get
"too many links"

17 REPLIES 17
Tim Nelson
Honored Contributor
Solution

Re: copy data on vg with lots of disks

Mr. Anderson ;)

How many disks is lots ?

The vg limit is 255 PVs.

Where do you get the error ?

Tim.

Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

see attach vgdisplay on first posting.
I get the error when I vgextend.
Tim Nelson
Honored Contributor

Re: copy data on vg with lots of disks

Sorry, I never read everything :)

Max PV 16
Cur PV 14


There is 16 max and 14 current. Only room to add two more 45GB drives.

If it will not even let you add these last two then it may be a long streatched idea but you just might be hitting maxfiles limit in kernel. I say this because once upon a time I could not get a lvlnboot listing because the number of physical devs on the server was high. Once I increased the maxfile limit the problem resolved. ( again this is a looooonnnnnggg shot ).

Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

how can I move the data off this disk ?

pvmove ? another way ? with out backup and restore hopfully.
Steven E. Protter
Exalted Contributor

Re: copy data on vg with lots of disks

Shalom,

People always look for a short cut.

The best way to do this is to take a good old fashioned backup and restore it to the second system or disk set.

vgdisplay -v

Take a look at /var/adm/syslog/syslog.log

There may be more data in there.

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
Tim Nelson
Honored Contributor

Re: copy data on vg with lots of disks

You are stuck between a rock and a hard place.

If you have 11.23 vgmodify you can increase the max_pv from 16 to the max of 255. Read up on it and test it. Always have a good backup. Some vgmodify commands require that extents be moved and then renumbered. That part always scared me. Plus I believe the VG needs to be offline.

If vgmodify is not an option then:

Bust this big VG down. Create some new vgs with larger luns or at least set the max_pv higher in case you run into this again. Mount new ones, take down application, copy data to new mount, unmount old, remount new at old path.

Other options: Basically the same as above but back everything up to tape, completely redo your VGs and restore.

Moral, too many devices in a vg make you redo everyting eventually.

Best of luck.
Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

slightly different issue

root@ken04:/root # lvextend -m 1 /dev/vg07ken04/fs-db63p01 /dev/dsk/c67t4d7
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg07ken04/fs-db63p01" could not be extended.
Why would this happen and how can I mirror the disk ?

lvdisplay /dev/vg07ken04/fs-db63p01
--- Logical volumes ---
LV Name /dev/vg07ken04/fs-db63p01
VG Name /dev/vg07ken04
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 10240
Current LE 1280
Allocated PE 1280
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/partially-distributed
IO Timeout (Seconds) default
SKR_1
Trusted Contributor

Re: copy data on vg with lots of disks

Hi,

Here PVG technique you need to use. you cant directly extend the LVOL if its PVG-strict there.

Thanks

SKR
SKR_1
Trusted Contributor

Re: copy data on vg with lots of disks

Please provide vgdisplay and lvdisplay outputs

Thanks

SKR
Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

lvdisplay
Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

vgdisplay -v
Aneesh Mohan
Honored Contributor

Re: copy data on vg with lots of disks

Hi ,

>root@ken04:/root # lvextend -m 1 /dev/vg07ken04/fs-db63p01 /dev/dsk/c67t4d7
>lvextend: Not enough free physical extents available.
>Logical volume "/dev/vg07ken04/fs-db63p01" could not be extended.
>Why would this happen and how can I mirror the disk ?

Please see the below values from vgdisplay -v vg21ken18

from vgdisplay output:-
-----------------------

Max PV 16
Cur PV 14
Act PV 14
Max PE per PV 11013
VGDA 28
PE Size (Mbytes) 4


LV Name /dev/vg21ken18/fs-db05p1
LV Status available/syncd
LV Size (Mbytes) 71600
Current LE 17900
Allocated PE 17900
Used PV 10

The LV capacity is 71.6 GB and you are trying to mirror this with a single hard disk (only 44GB can be allocated from the new harddisk).

The better way to move a set of disks to new disks is to create a new volume group with healthy values and copy/restore the data ,since the vgmodify is not existing in 11.11.

If you don`t like to do copy/restore then better to do using pvmove.


Thanks,
Aneesh
Tim Nelson
Honored Contributor

Re: copy data on vg with lots of disks

Try to turn off PVG strict. Unless you intend to do Physicsl Volume Grouping the "strictness" shoul only be "strict" e.g. cannot mirror to same disk.

lvchange -s y /dev/vg07ken04/fs-db63p01

This is interesting as PVG is turned on but there are no PVGs seen in any of the vgdisplay info ?

Do you have an /etc/lvmpvg file, if so post the content. It does not really matter but you may run into this in the future.

SKR_1
Trusted Contributor

Re: copy data on vg with lots of disks

Really its strange to see LVOL is PVG-strict and there are no PVG seen in VG.

you need to change the PVG-strict policy of the LVOL first, then you can extend this LVOL.

Use tom command to remove the PVG policy.

Thanks

SKR
Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

can I change the pvg strict without data loss?
Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

can I run "lvchange -s y /dev/vg07ken04/fs-db63p01" with out data loss?

Can I run "lvchange -s y /dev/vg07ken04/fs-db63p01" when the file system is mounted ?
Douglass A Anderson
Frequent Advisor

Re: copy data on vg with lots of disks

I did a lvchange -D and lvchange -s and it worked perfectly.