Bug 1393566 - LVM Cache: Be ready to consume cache metadata V2
Summary: LVM Cache: Be ready to consume cache metadata V2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1436748
TreeView+ depends on / blocked
 
Reported: 2016-11-09 21:27 UTC by Jonathan Earl Brassow
Modified: 2019-08-21 18:28 UTC (History)
9 users (show)

Fixed In Version: 2.02.169
Clone Of:
: 1436748 (view as bug list)
Environment:
Last Closed: 2019-08-21 18:28:35 UTC
Embargoed:
agk: lvm-technical-solution+
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Jonathan Earl Brassow 2016-11-09 21:27:14 UTC
The on-disk metadata used by dm-cache is being updated to allow for performance enhancements.  LVM will need to pass down additional DM table arguments in order to activate these changes.  We need to have a solution ready that is forward/backwards compatible.

Comment 1 Zdenek Kabelac 2017-02-20 10:09:06 UTC
So lets list the options:

lvm2 new parameter:

1.) --cacheversion   1|2|auto

2.) --cache-metadata-version 2 ?

3.) --metadata-version 2  ?

4.) --cacheformat   1|2|auto    (or maybe this: v1|v2|auto ) ?


---

libdm API options:

1.) add new dm_tree_node_set_cache_version(....) 
2.) add new dm_tree_node_set_cache_format(....) 

3.) #define DM_CACHE_FEATURE_FORMAT_2 
4.) #define DM_CACHE_FEATURE_FORMAT_V2 
5.) #define DM_CACHE_FEATURE_VERSION_2 


---

ATM I'd prefer the format to be automatically recognized by the 'cache_check' tool - as adding some 'magical' args by lvm2 to the existing configurable set can be problematic for a user - it could be done - but lvm2 will be changing passed option set.

i.e. it's then unclear if we should use:

cache_check  --metadata-version 2

and also

cache_check  --metadata-version 1

or just use it with version 2 ?

---

Waiting for more judgment here.

Comment 2 Zdenek Kabelac 2017-03-28 18:01:27 UTC
So the upstream implementation uses:


lvcreate/lvconvert --cachemetadataformat auto|1|2  option to select format of cache metadata.

There is also support for metadata profile option:

allocation/cache_metadata_format   0|1|2    (0 == auto)

Expected usage is to pass this option while 'caching LV' - but it also work when you create cache-pool.

To see 'cachemetadataformat' in lvm2 metadata use: 'lvs -o+cachemetadataformat'
To see in-kernel format use: 'lvs -o+kernelmetadataformat' - but this is rather complementary function.

For cache-pool metadata format might be 'unselected'.
For actual cached LV it is always having value  1 or 2 (ATM).

For usage of metadata 2 format it's MANDATORY to have installed:
>= device-mapper-persistent-data-0.7.0-0.1.rc6


Note You need to log in before you can comment on or make changes to this bug.