1833178 Members
2865 Online
110051 Solutions
New Discussion

lvextend error

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

lvextend error

Hi All,
I am in the middle of mirroring my root drive on an 11.0 system. My secondary root drive failed. I am familiar with all the steps to mirror a drive properly however I am getting an error this time. vg00 primary and vg00 secondary disks are the same size, 9Gbytes. when trying to entend a mirror copy of lvol6(/tmp), I get the following error:

lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c0t5d0
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol6" could not be extended.
Failure possibly caused by strict allocation policy

Caused by one mirror disk having more free extents than the other mirror copy. How can one disk have a difference if they are both the same size? I dont want to turn of "strick allocation" because of the obvious.

10x
RPM
UNIX IS GOOD
25 REPLIES 25
Mark Grant
Honored Contributor

Re: lvextend error

Well, maybe not all logical volumes have strict allocation and therefore you have a primary and mirror of bits of the same logical volume on the second disk. I think you should do a pvdisplay -v on all the disks to see which extents have been placed where.
Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor

Re: lvextend error

Robert,

Can you post the output of vgdisplay -v vg00 and pvdisplay /dev/dsk/cXtXdX and pvdisplay /dev/dsk/cYtYdY (both of the mirrors, in other words)?


Pete

Pete
Jeff Schussele
Honored Contributor

Re: lvextend error

Hi RPM,

I think you may be misunderstanding "strict allocation". You NEED to have this on as it causes the mirror pairs to be on different disks. With it off you can have both mirror pairs on the same disk & if that disk fails - game's over.
You need to restart the mirror process after lvreducing the already mirrored LVs and then lvchange -s y /dev/vg00/lvolX
to set the allocation policy to strict

Run
lvdisplay -v /dev/vg00/lvolX | more
and you'll see that the pairs are actually on the same disk - not a good thing.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Nobody's Hero
Valued Contributor

Re: lvextend error

That is the 1st thing I did Mark and I dont see any problems. Looking again.....
UNIX IS GOOD
T G Manikandan
Honored Contributor

Re: lvextend error

The problem here is,

you have the same size disks.

you have some volumes mirrored.
Also you have some other volumes which are non-mirrored.
Mirrored volumes take space on both the disks and non-mirrored volumes take space on only the one disk.
So lvextend pops up this error.
what you can do is you can add additional disks to the VG.

Or
you can move the non-mirrored lv's to some other VG(other disks)

thanks
G. Vrijhoeven
Honored Contributor

Re: lvextend error

Hi,

You can use pvdisplay -v /dev/dsk/c?t?d? to view if the problem is related to strict allocation.


PV Name /dev/dsk/c1t6d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 11
PE Size (Mbytes) 16
Total PE 4374
Free PE 1248
Allocated PE 3126
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol1 6 6
/dev/vg00/lvol2 640 640
/dev/vg00/lvol3 16 16
/dev/vg00/lvol4 128 128
/dev/vg00/lvol5 128 128
/dev/vg00/lvol6 128 128
/dev/vg00/lvol7 128 128
/dev/vg00/lvol9 25 25
/dev/vg00/lvol10 640 640
/dev/vg00/lvol11 1280 1280

--- Physical extents ---
PE Status LV LE
0000 current /dev/vg00/lvol1 0000
0001 current /dev/vg00/lvol1 0001
0002 current /dev/vg00/lvol1 0002
0003 current /dev/vg00/lvol1 0003
0004 current /dev/vg00/lvol1 0004
0005 current /dev/vg00/lvol1 0005
0006 current /dev/vg00/lvol2 0000
0007 current /dev/vg00/lvol2 0001
0008 current /dev/vg00/lvol2 0002
0009 current /dev/vg00/lvol2 0003
0010 current /dev/vg00/lvol2 0004
0011 current /dev/vg00/lvol2 0005
0012 current /dev/vg00/lvol2 000
...... etc.


Gideon
Pete Randall
Outstanding Contributor

Re: lvextend error

Robert,

On that pvdisplay, make it pvdisplay -v but don't include all the "--- Physical extents ---" stuff.


Pete

Pete
Nobody's Hero
Valued Contributor

Re: lvextend error

Of course, 6 is primary and 5 is mirror.
See attached
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: lvextend error

VG
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: lvextend error

PV 6
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: lvextend error

PV 5
UNIX IS GOOD
Lorenzo Facello
Valued Contributor

Re: lvextend error

Hi,
try to verify the disk's size:
diskinfo -v /dev/rdsk/cxtxdx

and

verify that your lvol6 is ok!
lvdisplay -v /dev/vg00/lvol6
fsck -V
Hope this Helps.
L.





T G Manikandan
Honored Contributor

Re: lvextend error

unmirrored lv's
dev/vg00/lvol7
/dev/vg00/lvol8
only are on the first disk.

Pete Randall
Outstanding Contributor

Re: lvextend error

Robert,

There are two other PV's, according to your vgdisplay, AND, I don't see lvol 6 on either pv5 or pv6!!


Pete

Pete
Lorenzo Facello
Valued Contributor

Re: lvextend error

can I have the bdf output??
Pete Randall
Outstanding Contributor
Solution

Re: lvextend error

Robert,

My conclusion at this point is that lvol6 resides on pv4 (c0t4d0) and pv3 (c0t3d0). The problem is that pv4 is completely full.


Pete

Pete
Nobody's Hero
Valued Contributor

Re: lvextend error

I understand that lv 7 and 8 are not done yet. My lvextend error happened while extending lv 6.
UNIX IS GOOD
Lorenzo Facello
Valued Contributor

Re: lvextend error

you have x file system on PVx, this PVx is full. I think there was a confiruation error at the moment of vg00 creation
Nobody's Hero
Valued Contributor

Re: lvextend error

Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 159744 98614 57319 63% /
/dev/vg00/lvol1 143573 23291 105924 18% /stand
/dev/vg00/lvol8 1572864 1185755 362998 77% /var
/dev/vg00/lvol7 2129920 708515 1332613 35% /usr
/dev/vg00/lvol6 2060288 4338 1930124 0% /tmp
/dev/vg02/lvol1 64811008 13903528 50509776 22% /pluto_archive_NFS2
/dev/vg01/lvol1 64811008 46837256 17833392 72% /pluto_archive_NFS1
/dev/vg00/lvol5 2129920 2090558 39362 98% /opt
/dev/vg00/lvol13 1716224 1400837 297803 82% /home
pluto:/u 35543812 16320765 19223047 46% /pluto_data
UNIX IS GOOD
Pete Randall
Outstanding Contributor

Re: lvextend error

Robert,

I guess we'll need to see the pvdisplay -v (less the PE detail) for c0t4d0 and c0t3d0 as well.


Pete

Pete
Nobody's Hero
Valued Contributor

Re: lvextend error

Ok I got it. I see, I have root vg00, spread accross 2 disks an 8 gig and a 4gig. I need to start to mirror lv6 to the mirror 4 gig drive because 5 is full.


Thanks,
B.
UNIX IS GOOD
Pete Randall
Outstanding Contributor

Re: lvextend error

Robert,

I'm concerned that you still seem to think that there are only two disks in vg00. Look at your vgdisplay -v output. You'll see 4 disks. You need to get a handle on how things are distributed across all 4 before you can correct the imbalance that is causing you problems.


Pete

Pete
Nobody's Hero
Valued Contributor

Re: lvextend error

Thanks Pete,

The way I see it is,

c0t6d0 is the primary.
c0t5d0 is the primary mirror
c0t4d0 is the primary with /tmp /var.....
c0t3d0 is the mirror of 4.

I am going to reignite the box and resize the filesystems.


Thanks for all your help. What do you think of me doing a re-ignite? The reason I used more that one root disk was that a long time ago, an app on this box required 5 Gbytes of swap, so I made dev swap 5GB. I want to re-size, do you think I will be ok?
UNIX IS GOOD
Pete Randall
Outstanding Contributor

Re: lvextend error

Robert,

Either way it's going to be a bit of work. You might be able to lvreduce/lvremove/lvcreate/lvextend to manipulate where things are located but you'll likely have to restore the contents anyway. I would think that makes Ignite the easier choice. Get things arranged on your primaries using Ignite, then start mirroring again, being careful where the mirrors are placed.


Pete

Pete