Grow LVM Thin Volume
It seems growing an lvm volume group (vg) with thin provisioned volumes using conventional lvm tools can be dangerous, as the metadata pool is sized independantly of the thin pool. If you run out of metadata pool space, things go sideways in a hurry.
References:
[Stack Overflow] LVM Thinpool - How to resize a thinpool LV? tl;dr: Milan Kerslager brings the warning re vgresize in a comment, and links to:
[Proxmox Forums] Resize LVM Thin Pool tl;dr: OP presents horror story; Proxmox staff suggests resizing the metadata pool proportionally to thin pool growth, and links to:
[Proxmox docs] LVM2: Resize metadata pool tl;dr: lvresize --poolmetadatasize +<size[M,G]> <VG>/<LVThin_pool> to resize the metadata, which is required when extending a thin pool. It also contains this formula for metadata size: PoolSize/ChunkSize * 64b = MetadataPoolSize among other good-to-know information about lvm and lvmthin, including a warning that overprovisioned lvmthin does not warn when reaching full, it silently corrupts (see man lvmthin: Automatically extend thin pool LV)
man lvmthin tl;dr: Read the sections on "Automatically extend thin pool LV" and configure alerts based on syslog messages to reach someone or some system that will take action (assuming your vg may run out of space at the same time as the thin provisioned lv., and automatically growing will not be an option; also does autogrowth resize your filesystem of choice on this volume?).
This post was created to metabookmark a series of reading and save the knowledge for future reference and easy sharing.
References:
[Stack Overflow] LVM Thinpool - How to resize a thinpool LV? tl;dr: Milan Kerslager brings the warning re vgresize in a comment, and links to:
[Proxmox Forums] Resize LVM Thin Pool tl;dr: OP presents horror story; Proxmox staff suggests resizing the metadata pool proportionally to thin pool growth, and links to:
[Proxmox docs] LVM2: Resize metadata pool tl;dr: lvresize --poolmetadatasize +<size[M,G]> <VG>/<LVThin_pool> to resize the metadata, which is required when extending a thin pool. It also contains this formula for metadata size: PoolSize/ChunkSize * 64b = MetadataPoolSize among other good-to-know information about lvm and lvmthin, including a warning that overprovisioned lvmthin does not warn when reaching full, it silently corrupts (see man lvmthin: Automatically extend thin pool LV)
man lvmthin tl;dr: Read the sections on "Automatically extend thin pool LV" and configure alerts based on syslog messages to reach someone or some system that will take action (assuming your vg may run out of space at the same time as the thin provisioned lv., and automatically growing will not be an option; also does autogrowth resize your filesystem of choice on this volume?).
This post was created to metabookmark a series of reading and save the knowledge for future reference and easy sharing.
Comments
Post a Comment