Bug 236699

Summary: lvm2: The error message of lvcreate was not understood easily.
Product: Red Hat Enterprise Linux 5 Reporter: TAIRA Hajime <htaira>
Component: lvm2Assignee: Milan Broz <mbroz>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Marthaler <cmarthal>
Severity: low Docs Contact:
Priority: medium    
Version: 5.0CC: agk, dwysocha, jbrassow, mbroz, prockai, pvrabec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-19 12:45:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for kind error message none

Description TAIRA Hajime 2007-04-17 05:32:33 UTC
Description of problem:
When I treid to create mirrored logical volume by following command.

# lvcreate -m 1 -l 5 -n mirroredlv1 vg02
  Not enough PVs with free space available for parallel allocation.

The error message of lvcreate was not understood easily.


Version-Release number of selected component (if applicable):


How reproducible:
When only two PV is prepared and the command is executed.

Steps to Reproduce:
1. Create PV at /dev/sdb.
  # pvcreate /dev/sdb
2. Create PV at /dev/sdc.
  # pvcreate /dev/sdc
3. Create VG at /dev/sdb and /dev/sdc.
  # vgcreate vg02 /dev/sdb /dev/sdc
4. Create mirrored LV.
  # lvcreate -m 1 -l 5 -n mirroredlv1 vg02
  
Actual results:
  Not enough PVs with free space available for parallel allocation.

Expected results:
  More kind error message.

Additional info:
  I propose error message. Look at the attached patch.

Comment 1 TAIRA Hajime 2007-04-17 05:32:33 UTC
Created attachment 152762 [details]
patch for kind error message

Comment 2 Milan Broz 2008-12-19 12:45:31 UTC
The allocation strategy is more complex, it depends what type of allocation for mirror is used. The attached patch is not correct in other situations.

For example, if you use "--alloc anywhere" log device will be allocated on the one of the existing mirror image devices and will not require own PV.

See also updated lvcreate -m page: there is described that disk log requires another device in default configuration.

Also the error message is currently for example:
  Insufficient suitable allocatable extents for logical volume : 2 more required
  Unable to allocate extents for mirror(s).

(well, the message can be probably improved for understandability more:-)

Closing per fix in man page for -m option, if you think it is still not ok please reopen, thanks.