Custom `segtypes`
Closed this issue · 1 comments
Weird question but is it at all possible to introduce custom segtypes
into lvm without modifying the code?
The reason I am asking is because it seems that QNAP uses a strange tier-thin-pool
segtype.
LVM installed on a different system can't do anything without erroring with:
WARNING: unrecognized segment type tier-thin-pool
From some googling it doesn't look like there are any seprate packages I can install to read that.
Just wondering if there is some mechanism I am missing (like a module or something) that you can use to add other segtypes.
If it helps,
Version of LVM on external system
LVM version: 2.03.17(2) (2022-11-10)
Library version: 1.02.187 (2022-11-10)
Version of LVM on QNAP
LVM version: 2.02.138(2)-git (2015-12-14)
Library version: 1.02.144-git (2015-12-14)
Googled a little harder.
Found their GPL artefacts here
The answer to my own question is yes(?)
I inspected their code and they are adding the special segtype
lib/metadata/segtype.h
#define SEG_TYPE_NAME_THICK "thick"
#define SEG_TYPE_NAME_THIN_POOL "thin-pool"
#define SEG_TYPE_NAME_TIER_THIN_POOL "tier-thin-pool"
#define SEG_TYPE_NAME_CACHE "cache"
#define SEG_TYPE_NAME_CACHE_POOL "cache-pool"