Operating System - HP-UX
1748256 Members
3921 Online
108760 Solutions
New Discussion юеВ

Re: Creating a Distributed logical volume

 
SOLVED
Go to solution
Sudhir Junonikar
Occasional Advisor

Creating a Distributed logical volume



Hi All,

I want to create a distributed logical volume in a volume group "vgrblrel" because all the LV's of "vgrblrel" VG are placed on single PV where as the VG contains two physical volumes.
As all the LV's of "vgrblrel" is on single PV & this VG contains major applications the disk is showing 99 % busy in SAR which is degrading system performance.
The vgrblrel contains followoing PV's

/dev/dsk/c5t3d0
/dev/dsk/c5t2d0

/dev/dsk/c5t3d0 contains all the LV' and /dev/dsk/c5t2d0 is free.
I have tried the following

# lvcreate -D y -s g -L 60000 -n lnprbl /dev/vgrblrel


but it is giving error " no lvmpvg file " checked the /etc directory for lvmpvg file but the file was missing
so i executed vgscan ( i know it rebuilds lvmtab but i got reference from forum) & manually created lvmpvg file
but no PVG's are defined in our system so again it has given error "no PVG are defined for vgrblrel".

I have tried the following also


#lvcreate -L 60000 -i 2 -I 1024 -n lnprbl /dev/vgrblrel
Logical volume "/dev/vgrblrel/lnprbl" has been successfully created with
character device "/dev/vgrblrel/rlnprbl".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vgrblrel/lnprbl" could not be extended.
lvcreate: Couldn't retrieve the list of the physical volumes
belonging to volume group "/dev/vgrblrel".
Run the "lvextend" command to create space on the Logical Volume.

The lvmtab file is as per below


/etc #strings lvmtab
/dev/vg00
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
/dev/vgsrc
/dev/dsk/c5t0d0
/dev/dsk/c5t1d0
/dev/vgrblrel
#Dl$
/dev/dsk/c5t3d0
/dev/dsk/c5t2d0


Output of vgdisplay of vgrblrel is

--- Volume groups ---
VG Name /dev/vgrblrel
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 35004
VGDA 4
PE Size (Mbytes) 16
Total PE 17498
Alloc PE 7411
Free PE 10087
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vgrblrel/lprdb
LV Status available/syncd
LV Size (Mbytes) 43008
Current LE 2688
Allocated PE 2688
Used PV 1

LV Name /dev/vgrblrel/rrblreldb
LV Status available/syncd
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 640
Used PV 1

LV Name /dev/vgrblrel/rrblreldwh
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vgrblrel/rrbltntdb
LV Status available/syncd
LV Size (Mbytes) 30000
Current LE 1875
Allocated PE 1875
Used PV 1

LV Name /dev/vgrblrel/rrbltntdwh
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vgrblrel/rcatalog
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vgrblrel/larchrbl1b
LV Status available/syncd
LV Size (Mbytes) 20480
Current LE 1280
Allocated PE 1280
Used PV 1

LV Name /dev/vgrblrel/lvarccatalog
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 32
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t3d0
PV Status available
Total PE 8749
Free PE 1338
Autoswitch On

PV Name /dev/dsk/c5t2d0
PV Status available
Total PE 8749
Free PE 8749
Autoswitch On

Please suggest any suggestion in this regard


Thanks & regards

Sudhir













14 REPLIES 14
TTr
Honored Contributor

Re: Creating a Distributed logical volume

The "-L 60000" is for a 60GB volume. One of the disks has 1388 free extends on it and with 16MB PE size you don't have enough room on the disk.

By the way all you volumes are created on the first disk and the second disk is totally empty.
Steven E. Protter
Exalted Contributor

Re: Creating a Distributed logical volume

Shalom,

I would try explicitly listing the physical volumes on the lvcreate command line.

There are examples in the man page for lvcreate.

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

Re: Creating a Distributed logical volume

Hi,

I'd suggest doing the following:

- create a good /etc/lvmpvg file, something as follows:

VG /dev/vgrblrel
PVG PVG0
/dev/dsk/c5t3d0
PVG PVG1
/dev/dsk/c5t2d0

- create a lvol less than 42816 Mbytes --> it's the result of [1338 (Free PE on c5t3d0) * 16 (PE Size of vgrblrel)] * 2 (PV's):

lvcreate -D y -s g -L 42816 -n lnprbl /dev/vgrblrel

This should create a lvol named lnprbl distributed for 1338 extents on c5t3d0 and 1338 extents on c5t2d0.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Ganesan R
Honored Contributor

Re: Creating a Distributed logical volume

Hi,

You should understand the difference between block level striping and and Extended based striping.

man lvcreate will provide good explanations about the differences.

The first step you have tried is extend based.

# lvcreate -D y -s g -L 60000 -n lnprbl /dev/vgrblrel

Second step you have tried is block level

#lvcreate -L 60000 -i 2 -I 1024 -n lnprbl /dev/vgrblrel

First one is always preferred since block level striping not supported in mirroring.

If you already created the logical volume remove it first and follow steps provided by Fabio Ettore. He has provided the exact steps.


Best wishes,

Ganesh.
Sudhir Junonikar
Occasional Advisor

Re: Creating a Distributed logical volume



Thanks all for your reply,

Dear Fabio,

can i extend the created lv of your said size further.




Regards

Sudhir
Sudhir Junonikar
Occasional Advisor

Re: Creating a Distributed logical volume




Dear Fabio,

I tried to create lv with size less than 42816

But it result in error " not enough PE's "

/ #lvcreate -D y -s g -L 40000 -n lnprbl /dev/vgrblrel
Logical volume "/dev/vgrblrel/lnprbl" has been successfully created with
character device "/dev/vgrblrel/rlnprbl".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vgrblrel/lnprbl" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.
/ #lvremove -f /dev/vgrblrel/lnprbl
Logical volume "/dev/vgrblrel/lnprbl" has been successfully removed.
Volume Group configuration for /dev/vgrblrel has been saved in /etc/lvmconf/vgrb
lrel.conf

/ #lvcreate -D y -s g -L 20000 -n lnprbl /dev/vgrblrel
Logical volume "/dev/vgrblrel/lnprbl" has been successfully created with
character device "/dev/vgrblrel/rlnprbl".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vgrblrel/lnprbl" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.
/ #


Regards

Sudhir

Ganesan R
Honored Contributor

Re: Creating a Distributed logical volume

Hi,

Could you provide the current #vgdisplay -v /dev/vgrblrel output?
Best wishes,

Ganesh.
Fabio Ettore
Honored Contributor

Re: Creating a Distributed logical volume

Hi,

I suppose you've created /etc/lvmpvg, please post the contents of this file.
Anyway once created successfully the file please do the following:

- lvremove /dev/vgrblrel/lnprbl
- lvcreate -D y -s g -L 32 -n lnprbl /dev/vgrblrel

This command creates a lvol just of 2 extents (16MB of one PE * 2 = 32MB).
Check by lvdisplay -v /dev/vgrblrel/lnprbl the lvol was created with one extent on c5t3d0 and the following one on c5t2d0.

Best regards,
Fabio
WISH? IMPROVEMENT!
Sudhir Junonikar
Occasional Advisor

Re: Creating a Distributed logical volume



Dear Fabio,

I have created the lv with two PE's but is it possible to extend its size by lvextend command.

The lvdisplay, vgdisplay, & lvmpvg file for your reference.


/ #lvdisplay -v /dev/vgrblrel/lnprbl
--- Logical volumes ---
LV Name /dev/vgrblrel/lnprbl
VG Name /dev/vgrblrel
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 32
Current LE 2
Allocated PE 2
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c5t2d0 1 1
/dev/dsk/c5t3d0 1 1

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c5t3d0 02688 current
00001 /dev/dsk/c5t2d0 00000 current

/ #vgdisplay -v /dev/vgrblrel
--- Volume groups ---
VG Name /dev/vgrblrel
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 35004
VGDA 4
PE Size (Mbytes) 16
Total PE 17498
Alloc PE 7413
Free PE 10085
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vgrblrel/lprdb
LV Status available/syncd
LV Size (Mbytes) 43008
Current LE 2688
Allocated PE 2688
Used PV 1

LV Name /dev/vgrblrel/lnprbl
LV Status available/syncd
LV Size (Mbytes) 32
Current LE 2
Allocated PE 2
Used PV 2

LV Name /dev/vgrblrel/rrblreldb
LV Status available/syncd
LV Size (Mbytes) 10240
Current LE 640
Allocated PE 640
Used PV 1

LV Name /dev/vgrblrel/rrblreldwh
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vgrblrel/rrbltntdb
LV Status available/syncd
LV Size (Mbytes) 30000
Current LE 1875
Allocated PE 1875
Used PV 1

LV Name /dev/vgrblrel/rrbltntdwh
LV Status available/syncd
LV Size (Mbytes) 6144
Current LE 384
Allocated PE 384
Used PV 1

LV Name /dev/vgrblrel/rcatalog
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vgrblrel/larchrbl1b
LV Status available/syncd
LV Size (Mbytes) 20480
Current LE 1280
Allocated PE 1280
Used PV 1

LV Name /dev/vgrblrel/lvarccatalog
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 32
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t2d0
PV Status available
Total PE 8749
Free PE 8748
Autoswitch On

PV Name /dev/dsk/c5t3d0
PV Status available
Total PE 8749
Free PE 1337
Autoswitch On


--- Physical volume groups ---
PVG Name PVG0
PV Name /dev/dsk/c5t3d0

PVG Name PVG1
PV Name /dev/dsk/c5t2d0



lvmpvg file

VG /dev/vgrblrel
PVG PVG0
/dev/dsk/c5t3d0
PVG PVG1
/dev/dsk/c5t2d0
VG /dev/vg00
PVG PVG0
/dev/dsk/c2t0d0
PVG PVG1
/dev/dsk/c2t1d0
VG /dev/vgsrc
PVG PVG0
/dev/dsk/c5t0d0
PVG PVG1
/dev/dsk/c5t1d0






Regards

Sudhir