Skip to main content

lvmthin-helper automates LVM Thin Provisioning management by analyzing user inputs and current setups, offering optimized configurations and troubleshooting steps for efficient storage.

Project description

lvmthin‑helper

PyPI version License: MIT Downloads LinkedIn

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")

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lvmthin_helper-2025.12.21233703.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lvmthin_helper-2025.12.21233703-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file lvmthin_helper-2025.12.21233703.tar.gz.

File metadata

File hashes

Hashes for lvmthin_helper-2025.12.21233703.tar.gz
Algorithm Hash digest
SHA256 410010c6680fa2450a1f8abf6683a3817696c5d48ce1398d0fb0c9b3e441915c
MD5 cee7e5d9b982e1807a3be12347b49b4b
BLAKE2b-256 863611760c7a89e0c5a96b306f0bc955e7ccd89cea4d28252ecdb3a397998f91

See more details on using hashes here.

File details

Details for the file lvmthin_helper-2025.12.21233703-py3-none-any.whl.

File metadata

File hashes

Hashes for lvmthin_helper-2025.12.21233703-py3-none-any.whl
Algorithm Hash digest
SHA256 86680340db839922b4212fb03c20c5b94d6669bd68e772ae49bf55ce1281d366
MD5 568d91140c104ed06e229cffb149d93f
BLAKE2b-256 41fbfcf7bba7bd9ccfee1ff9b14f6acc9f665424443fe7084217407ddc401bbe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page