Operating System - HP-UX
1833750 Members
2222 Online
110063 Solutions
New Discussion

Re: Unable to mirror logical volume

 
SOLVED
Go to solution
J.A.R. Karremans
Frequent Advisor

Unable to mirror logical volume

Hi everybody,

I am trying to mirror my increased logical volume using SAM.

Increased from 10G to 20G, reastablish mirror, it says:

The command used to extend logical volumes, /sbin/lvextend, has failed. The stderr output from the command is shown below. The logical volume has not been extended.

lvextend: Not enough free physical extents available. Logical volume "/dev/vg00/lvol10" could not be extended. Failure possibly caused by strict allocation policy.

What now??

I need my mirror...
13 REPLIES 13
Pete Randall
Outstanding Contributor

Re: Unable to mirror logical volume

We really need more information. It sounds like there isn't enough space to extend but the reason could be one of several. What was the exact command you issued? What does an "lvdisplay -v /dev/vg00/lvol10" show? What does a "vgdisplay -v /dev/vg00" show?


Pete

Pete
G. Vrijhoeven
Honored Contributor

Re: Unable to mirror logical volume

Hi,

Is the lvol striped? Did you use pvg's ?

Gideon
J.A.R. Karremans
Frequent Advisor

Re: Unable to mirror logical volume

Dear Pete,

Thanx for being so quick again!

Uploaded are both output's.

I find nothing strange about them. It just feels like it wants the mirror-copy to be contiguous on the mirror-disk, and it cannot do this. I don't want it either!!

Thanx,
Regards,
Jan
Robert-Jan Goossens
Honored Contributor

Re: Unable to mirror logical volume

Hi,

Like Pete said, there could be various reasons why you can not mirror the logical volume, below you will find a link to good doc from the itrc database.

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062683957

lvextend: Not enough free physical extents available DocId: KBAN00000084

Hope this helps,
Robert-Jan
john korterman
Honored Contributor

Re: Unable to mirror logical volume

Hi,
your logical volune already uses both disks in the volume group. Therefore you cannot mirror to a separate disk, which is what strict allocation policy requires.

regards,
John K,
it would be nice if you always got a second chance
J.A.R. Karremans
Frequent Advisor

Re: Unable to mirror logical volume

So...

I need to remove the second (mirror) disk from the lv-definitions and re-insert it?
With something like lvreduce orso?

Regards,
Jan
Pete Randall
Outstanding Contributor
Solution

Re: Unable to mirror logical volume

Jan,

Lvol10 already occupies both physical volumes, and there's no space left on one of them: /dev/dsk/c1t15d0. Without going through a very extensive rearrangement of your logical volumes, the only alternative I see is to change the allocation policy to non strict (lvchange -s n ), which pretty much eliminates any advantage of having the volume mirrored in the first place.


Pete

Pete
Jean-Louis Phelix
Honored Contributor

Re: Unable to mirror logical volume

Hi,

The basic problem is that you really don't have enough space to mirror such a big lv, even without strict policy. Your maximum possible size is 262+1976 PE = 17904Mo. Or same result with

Total PE 8680 = 69440Mo

Total used without lvol10 = 6704-2500 PE = 33632Mo

Available per mirror copy for lvol10 = (69440-33632)/2 = 17904 Mo

So 20000 Mo is too much in this vg.

Regards.
It works for me (© Bill McNAMARA ...)
Pete Randall
Outstanding Contributor

Re: Unable to mirror logical volume

Good point, Jean-Louis. I didn't even look at the total space. It just won't fit!!


Pete

Pete
john korterman
Honored Contributor

Re: Unable to mirror logical volume

Hi,
perhaps my previous entry was not detailed enough. When you have defined a volume, the mirror for that must reside on a physically separate disk. As you only have two disks in the vol. group and the volume already uses extents from both disks, it cannot be mirrored.

Your present config says:
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t15d0 2238 2238
/dev/dsk/c0t10d0 262 262

meaning that 2238 + 262 = 2500 extents
the 2500 are used for the 20000 mb volume, meaning that each extend = 8 mb

Most of the volume is physically located on c1t15d0. If you reduce your volume to only use the 2238 extents on c1t15d0 it will make a volume the size of 2238 x 8 = 17904 mb
Such an operation would free the 262 extents on c0t10d0, which you could add to the existing 1976. This adds up to 2238 extents, meaning that there would be exactly enough space on c0t10d0 for mirroring 17904mb

That is what I think is possible. I may have overlooked something, as I am not used to such big numbers. Perhaps you better wait for other suggestions.

regards,
John K.
it would be nice if you always got a second chance
J.A.R. Karremans
Frequent Advisor

Re: Unable to mirror logical volume

Hi both,

Okay, but what I don't get now: I do not need the allocated space on the second (mirror) volume anymore, this is left-over rubish from the previous mirror (the previous lvol10, sized 10G which has been deleted and re-created as an lvol10, sized 20G). Can't I just remove that rubish from the second disk and get enough space to establish a mirror with the new, good and nice lvol10 of 20G on the first disk??
Jean-Louis Phelix
Honored Contributor

Re: Unable to mirror logical volume

Hi,

Perhaps you missed something ... There is *no* rubbish space for the old lvol10 ... It has been freed by lvremove, but you *don't* have enough space to create a 20Go mirrored lvol. *17904Mo* is your *maximum* allowed size.

Regards.
It works for me (© Bill McNAMARA ...)
J.A.R. Karremans
Frequent Advisor

Re: Unable to mirror logical volume

I think I get the picture now.

Creating a 16G lvol on the first disk, leaves the second one alone, leaving enough space to mirror lvol10 from the first disk on the second disk.

The 10G lvol spans both the first and the second disk in this lvol...

Alrighty then! I get the major idea... I was just convinced that the second disk in the VG was a dedicated mirror-disk, having a hard-boundry on size, but such is clearly not the case. This put's John's remarks in more clear perspective as well!!

Thanx very much!