Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stuttgart-things/manage-filesystem
manage LVM and resize Linux FS - handle repartitioning with filesystem resizing support
https://github.com/stuttgart-things/manage-filesystem
ansible filesystem linux lvm role stuttgart-things
Last synced: 2 days ago
JSON representation
manage LVM and resize Linux FS - handle repartitioning with filesystem resizing support
- Host: GitHub
- URL: https://github.com/stuttgart-things/manage-filesystem
- Owner: stuttgart-things
- License: apache-2.0
- Created: 2023-03-07T14:17:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-07T04:59:45.000Z (5 months ago)
- Last Synced: 2024-06-07T05:49:06.878Z (5 months ago)
- Topics: ansible, filesystem, linux, lvm, role, stuttgart-things
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stuttgart-things/manage-filesystem
handle repartitioning (LVM) with filesystem resizing support. For example, you can simply expand the LVM after enlarging the vhd.
The role automatically detects the LVM on the system. The partitions and the device id are also recognized automatically.**Note: You can easy check your partition number via fdisk or parted**
**Note: The enlargement of the file system is automatically calculated from the new free space**
**Note: This role requires become yes**
REQUIREMENTS AND DEPENDENCIES
Server and client:
- Ubuntu 24.04
- Ubuntu 22.04
- Rocky 9VARIABLES
1. requiered vars:
- lvm_home_sizing: 10%
- lvm_root_sizing: 60%
- lvm_var_sizing: 30%2. defaults: You don't need to change or add this variables.(Unless you want to overwrite it with other values)
- part_sizing: 100% #Size claimed from the vhd by LVM
- lv_home_name: home
- lv_var_name: var
- lv_root_name: rootROLE INSTALLATION
```bash
cat < /tmp/requirements.yaml
- src: https://github.com/stuttgart-things/manage-filesystem.git
version: 2024.05.15
scm: git
EOFansible-galaxy install -r /tmp/requirements.yaml --force
```EXAMPLE INVENTORY
```bash
cat < inventory
[appserver]
1.2.3.4 ansible_user=sthings
EOF
```EXAMPLE PLAYBOOK
```yaml
cat < manage-filesystem.yaml
---
- hosts: "{{ target_host | default('all') }}"
gather_facts: true
become: true
vars:
lvm_home_sizing: 10%
lvm_root_sizing: 60%
lvm_var_sizing: 30%roles:
- manage-filesystem
EOF
```EXAMPLE EXECUTION
```bash
ansible-playbook -i inventory manage-filesystem.yaml -vv
```## License
LICENSECopyright 2020 patrick hermann.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Role history
----------------
| date | who | changelog |
|---|---|---|
|2024-05-14 | Andre Ebert | Added Ansible-lint and Yamllint with skip rules and testing
|2020-29-09 | Marcel Zapf | Added logic to autodetect part id, device and vg name
|2020-16-09 | Marcel Zapf | Added logic to check partition is too small
|2020-10-08 | Marcel Zapf | First ReleaseAuthor Information
------------------```yaml
Andre Ebert ([email protected]); 05/2024Marcel Zapf; 08/2020; Stuttgart-Things
```