Operating System - HP-UX
1833589 Members
3590 Online
110061 Solutions
New Discussion

Changing an lvol to distributed

 
UNIXGRUPPEN
Advisor

Changing an lvol to distributed


I have an lvol for a progress db that is setup on one 18gb, mirroring to another 18gb.

I added a few 9gb disk and a few 4gb (all in pairs).
And edited /etc/lvmpvg so that the VG is using PVG.
Then lvreduce -m 0 for the lvol and lvchange -s g lvol, so the lvol uses PVG-strict.

The VG layout now looks like this,
--- Physical volume groups ---
PVG Name card0
PV Name /dev/dsk/c0t15d0
PV Name /dev/dsk/c0t5d0
PV Name /dev/dsk/c0t4d0
PV Name /dev/dsk/c0t3d0
PV Name /dev/dsk/c0t2d0
PV Name /dev/dsk/c0t13d0
PV Name /dev/dsk/c0t14d0

PVG Name card3
PV Name /dev/dsk/c3t11d0
PV Name /dev/dsk/c3t5d0
PV Name /dev/dsk/c3t4d0
PV Name /dev/dsk/c3t3d0
PV Name /dev/dsk/c3t2d0
PV Name /dev/dsk/c3t9d0
PV Name /dev/dsk/c3t10d0


The lvol is now on /dev/dsk/c0t15d0 and mirrored to /dev/dsk/c3t11d0.

Now finally to my big question,
what will happend if I do
lvchange -D y lvol ?

Will it move the extents across all disks, or will it only be distributed for 'new' data or is it not possible at all to make it distributed at this point ?

TIA
Johan

2 REPLIES 2
Johan Lorimier
Frequent Advisor

Re: Changing an lvol to distributed

HI,

As far as I know with distributed mode, the PE are striped over the different LV only after the first lvextend, ie you create a lv with a null size an then you can increase it with lvextend. A "lvdisplay -v" will show all PE which are alternatly disposed on all LV.

If you performed an lvextend on an already distributed LV, you will see by a lvdisplay that the new allocated PE are only on the new PV without any distribution on theses PV.


Hoefnix
Honored Contributor

Re: Changing an lvol to distributed

See manpage of lvchange:
The -D y option will fail if the
existing logical volume has any two
consecutive logical extents on the same
physical volume. To override this
failure, use the -D f option.

If a logical volume with the distributed
allocation policy has at least two
consecutive logical extents on the same
physical volume, then lvdisplay(1M) will
display the allocation as partially-
distributed (vs. distributed ).
--- END part manpage----

I suggest to look at pvmove (within a script)

HTH,