lvmthin‑helper
lvmthin_helper is a lightweight Python package that helps system administrators and storage engineers manage LVM Thin Provisioning configurations.
Given a natural‑language description of storage requirements, current LVM setup or a specific thin‑provisioning problem, the package uses LLM7 and the llmatch‑messages protocol to return structured, actionable advice or exact configuration snippets.
Key features:
- Zero‑config: Uses the free tier of LLM7 by default; falls back to an optional custom LLM from LangChain.
- Pattern‑based safety: The LLM response is validated against a pre‑defined regular‑expression to guarantee consistent, parseable output.
- Extensible: Pass your own LangChain
BaseChatModel(e.g. OpenAI, Anthropic, Google Gemini) if you prefer a different provider.
Installation
pip install lvmthin_helper
Basic Usage
from lvmthin_helper import lvmthin_helper
# Example user input – a description of the problem or requirement
user_input = """
I have two VG’s: vg_data (thin pool tp_data) and vg_backup (thin pool tp_backup).
I need to move a 120 GiB thin logical volume from vg_data to vg_backup, preserving data.
"""
# Call the helper – this will automatically use the free LLM7 tier
response = lvmthin_helper(user_input=user_input)
# response is a list of strings with step‑by‑step guidance / commands
print("\n".join(response))
Parameters
| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The natural‑language description of your storage need or issue. |
llm |
Optional[BaseChatModel] |
A LangChain-compatible LLM instance. If omitted the default ChatLLM7 is used. |
api_key |
Optional[str] |
API key for LLM7. If omitted it is read from the environment variable LLM7_API_KEY. |
Using a Different LLM Provider
OpenAI
from langchain_openai import ChatOpenAI
from lvmthin_helper import lvmthin_helper
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.2)
response = lvmthin_helper(user_input="Move a thin LV from VG A to VG B.", llm=llm)
Anthropic
from langchain_anthropic import ChatAnthropic
from lvmthin_helper import lvmthin_helper
llm = ChatAnthropic(model="claude-3-haiku-20240307", temperature=0.2)
response = lvmthin_helper(user_input="Resize a thin LV to 200 GiB.", llm=llm)
Google Gemini
from langchain_google_genai import ChatGoogleGenerativeAI
from lvmthin_helper import lvmthin_helper
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro-001")
response = lvmthin_helper(user_input="Check thin pool usage statistics.", llm=llm)
Rate Limits & API Key
- The free tier of LLM7 is sufficient for most typical use cases of this helper.
- If you need higher limits, obtain a key at https://token.llm7.io/ and either:
- Export it:
export LLM7_API_KEY="your_key_here" - Pass it directly:
lvmthin_helper(user_input, api_key="your_key_here")
- Export it:
License
MIT License – feel free to use, modify, and distribute.
Contributing & Issues
Bug reports, feature requests, and pull requests are welcome!
Please open an issue at: https://github.com/chigwell/lvmthin-helper/issues
Author
Eugene Evstafev
📧 hi@euegne.plus
GitHub: https://github.com/chigwell
Metadata
Release files for lvmthin-helper 2025.12.21233703
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lvmthin_helper-2025.12.21233703.tar.gz | 6.5 kB | Without provenance | Details for lvmthin_helper-2025.12.21233703.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lvmthin_helper-2025.12.21233703-py3-none-any.whl | Python 3 | none | any | Details for lvmthin_helper-2025.12.21233703-py3-none-any.whl |
Total release size: 13.8 kB
Release files / lvmthin_helper-2025.12.21233703.tar.gz
| Download URL | lvmthin_helper-2025.12.21233703.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
410010c6680fa2450a1f8abf6683a3817696c5d48ce1398d0fb0c9b3e441915c
|
|
BLAKE2b-256 checksum How to use checksums |
863611760c7a89e0c5a96b306f0bc955e7ccd89cea4d28252ecdb3a397998f91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / lvmthin_helper-2025.12.21233703-py3-none-any.whl
| Download URL | lvmthin_helper-2025.12.21233703-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86680340db839922b4212fb03c20c5b94d6669bd68e772ae49bf55ce1281d366
|
|
BLAKE2b-256 checksum How to use checksums |
41fbfcf7bba7bd9ccfee1ff9b14f6acc9f665424443fe7084217407ddc401bbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for lvmthin-helper 2025.12.21233703
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.