https://github.com/chigwell/lvmthin-helper
lvmthin-helper automates LVM Thin Provisioning management by analyzing user inputs and current setups, offering optimized configurations and troubleshooting steps for efficient storage.
https://github.com/chigwell/lvmthin-helper
accurate-solutions actionable-guidance clear-responses concise-advice configuration-advice configuration-snippets efficient-storage-utilization llm7 llmatch-messages lvm lvm-setup performance-optimization step-by-step-guides storage-issues storage-management storage-optimization storage-requirements system-administration thin-provisioning
Last synced: 6 months ago
JSON representation
lvmthin-helper automates LVM Thin Provisioning management by analyzing user inputs and current setups, offering optimized configurations and troubleshooting steps for efficient storage.
- Host: GitHub
- URL: https://github.com/chigwell/lvmthin-helper
- Owner: chigwell
- Created: 2025-12-21T23:37:00.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-21T23:37:15.000Z (7 months ago)
- Last Synced: 2025-12-23T10:40:45.993Z (7 months ago)
- Topics: accurate-solutions, actionable-guidance, clear-responses, concise-advice, configuration-advice, configuration-snippets, efficient-storage-utilization, llm7, llmatch-messages, lvm, lvm-setup, performance-optimization, step-by-step-guides, storage-issues, storage-management, storage-optimization, storage-requirements, system-administration, thin-provisioning
- Language: Python
- Homepage: https://pypi.org/project/lvmthin-helper/
- Size: 5.86 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lvmthin‑helper
[](https://badge.fury.io/py/lvmthin-helper)
[](https://opensource.org/licenses/MIT)
[](https://pepy.tech/project/lvmthin-helper)
[](https://www.linkedin.com/in/eugene-evstafev-716669181/)
`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
```bash
pip install lvmthin_helper
```
---
## Basic Usage
```python
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
```python
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
```python
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
```python
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 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:
---
## Author
Eugene Evstafev
📧 hi@euegne.plus
GitHub: