Bug 1307180

Summary: man lvm states '_rlog' is a reserved name, but you can create a lv with that name
Product: [Fedora] Fedora Reporter: Tony Asleson <tasleson>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: agk, bmarzins, bmr, dwysocha, heinzm, jonathan, lvm-team, msnitzer, prajnoha, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.150-2.fc24.x86_64 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-01 09:17:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tony Asleson 2016-02-12 22:57:41 UTC
Description of problem:

Man page states:

The LV name may also not contain any  of  the  following  strings:  '_cdata',  '_cmeta',  '_corig', '_mlog',  '_mimage',  '_pmspare',  '_rimage', '_rlog', '_tdata' or '_tmeta'.

eg.

# lvcreate -L16m -n "a_rlog" test
  Logical volume "a_rlog" created.

# lvcreate -L16m -n "_rlog" test
  Logical volume "_rlog" created.

# lvs -o lv_full_name
  LV         
  test/_rlog 
  test/a_rlog


Version-Release number of selected component (if applicable):
LVM version:     2.02.132(2) (2015-09-22)
Library version: 1.02.109 (2015-09-22)
Driver version:  4.33.0

How reproducible:
Always

Steps to Reproduce:
See above

Actual results:
lv is created


Expected results:
Based on man page we would expect the following:

Names including "_rlog" are reserved. Please choose a different LV name.
  Run `lvcreate --help' for more information.

Additional info:

Either the documentation is incorrect or the code enforcing it is incorrect.

Comment 1 Peter Rajnoha 2016-02-17 14:41:37 UTC
(In reply to Tony Asleson from comment #0)
> Either the documentation is incorrect or the code enforcing it is incorrect.

It's documentation that is listing it incorrectly - I think it was meant to be "_rmeta" instead of "_rlog". Also, the list of restricted suffixes in the man page missed the '_vorigin'.


From lib/misc/lvm-string.c:

static const char *_lvname_has_reserved_string(const char *lvname)
{
        static const char _strings[][12] = {
                "_cdata",
                "_cmeta",
                "_corig",
                "_mimage",
                "_mlog",
                "_pmspare",
                "_rimage",
                "_rmeta",
                "_tdata",
                "_tmeta",
                "_vorigin"
        };
        ...
}

(man page fix: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=055c628e38589bf1ea66bc0b2c5da36ed115b551)

Comment 2 Mike McCune 2016-03-28 22:58:03 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions