* [PATCH LVM2] set stripes = 0 for the log device only allocation
@ 2006-12-12 22:54 Jun'ichi Nomura
0 siblings, 0 replies; only message in thread
From: Jun'ichi Nomura @ 2006-12-12 22:54 UTC (permalink / raw)
To: lvm-devel
Hi,
This patch fixes the allocation failure at adding mirror log
if there is only one PV available.
In lib/metadata/lv_manip.c:_allocate(), the number of stripes
is used for calculation of the number of necessary PVs.
if (areas_size < ah->area_count + ah->log_count) {
On the other hand, lvconvert gives stripes = 1 even if the
allocation request is for log device only.
As a result, the check above will fail if there is only one
PV available and the command will fail as followings:
Not enough PVs with free space available for parallel allocation.
even though the log device should be allocated from the free PV
without problem.
For log-only allocation, don't give stripes = 1 to the allocator.
The stripes value is considered to be the number of stripes
for which the allocation is requested. (i.e. ah->area_count)
Patch applicable to LVM2 2.02.16.
The patch depends on safe-area_multiple.patch for correct handling
of stripes = 0 by the allocator.
Shell script to reproduce the problem and the sample metadata
is attached for reference.
You can reproduce the problem with just executing the script
without additional parameters.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set-stripes-0-for-log-alloc.patch
Type: text/x-patch
Size: 1330 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20061212/6f090191/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-logalloc-from-only-one-free-PV.sh
Type: application/x-sh
Size: 2304 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20061212/6f090191/attachment.sh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lvm2-logalloc-from-only-one-free-PV.vg
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20061212/6f090191/attachment.ksh>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-12 22:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 22:54 [PATCH LVM2] set stripes = 0 for the log device only allocation Jun'ichi Nomura
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.