From: Pablo Ruiz <pablo.ruiz@gmail.com>
To: pve-devel@pve.proxmox.com
Subject: [pve-devel] Allow dynamic pool name discovery on ZFSPoolPlugin
Date: Sat, 21 Nov 2020 14:08:47 +0100 [thread overview]
Message-ID: <CAHfDCQL4-CmvDGA3YynYjiHpEcukDDUpj7aDF+dHZ9XY-=GhFw@mail.gmail.com> (raw)
Hi,
I've just made a little custom storage plugin which basically
overrides/extends ZFSPoolPluging so the pool name instead of being fixed,
can be 'dynamically' guessed on each cluster node.
While adding some new nodes to one of our current clusters, due to hardware
differences, we ended up with new nodes having a different zpool's layout
than the already existing nodes. Our existing nodes had a pool named
'rpool/data' (a dataset nested into system's main pool). While the new
nodes have a dedicated pool (data) independent of 'rpool'. So we needed a
way to have the same storage use different backing zfs pools on each server
(ie. on old servers it should use 'rpool/data', while on newer ones it
should be using 'data').
Currently proxmox does not allow overriding an storage.cfg's property
'per-node'. So we came up with a simple custom plugin which basically looks
up the pool with an attribute like 'pve:id=$storeid', and uses this pool
obtained dynamically.
We could have simply added a new store with a different id, but that would
break our orchestration and automatic deployment of machines, and add some
additional management issues by having to track the store of each machine,
specially if/when moving vms around.
That said, the plugin works, but I think this feature may be of use to
others. Would a patch against upstream ZFSPoolPlugin accepted, so we can
avoid this custom plugin in the future?
I've posted the custom plugin as a gist:
https://gist.github.com/pruiz/5d7fbd75efb413ac15d2d0e3ef54f32a
Regards
Pablo
next reply other threads:[~2020-11-21 13:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-21 13:08 Pablo Ruiz [this message]
2020-11-23 7:49 ` Thomas Lamprecht
2020-11-23 7:54 ` Carsten Härle
2020-11-23 16:34 ` Pablo Ruiz
2020-11-23 16:34 ` Pablo Ruiz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHfDCQL4-CmvDGA3YynYjiHpEcukDDUpj7aDF+dHZ9XY-=GhFw@mail.gmail.com' \
--to=pablo.ruiz@gmail.com \
--cc=pve-devel@pve.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox