Decreased loop devices file size

This commit is contained in:
Klention Mali 2025-07-14 20:03:47 +02:00
commit e5d08539fe
No known key found for this signature in database
GPG key ID: 777C0B2D8F048DAB
2 changed files with 8 additions and 7 deletions

View file

@ -3,7 +3,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Unmounting LV lv_tmp_test from {{ remote_tmp_dir }}/tmp_mount - name: Unmounting LV lv_tmp_test
ansible.posix.mount: ansible.posix.mount:
fstab: '{{ remote_tmp_dir }}/fstab' fstab: '{{ remote_tmp_dir }}/fstab'
path: '{{ remote_tmp_dir }}/tmp_mount' path: '{{ remote_tmp_dir }}/tmp_mount'
@ -12,7 +12,7 @@
- name: Removing xfs filesystem from LV lv_tmp_test - name: Removing xfs filesystem from LV lv_tmp_test
community.general.filesystem: community.general.filesystem:
dev: /dev/vg_tmp_test/lv_tmp_test dev: /dev/vg_tmp_test/lv_tmp_test
status: absent state: absent
- name: Detaching first loop device - name: Detaching first loop device
ansible.builtin.command: losetup -d {{ loop_device_01.stdout }} ansible.builtin.command: losetup -d {{ loop_device_01.stdout }}

View file

@ -3,13 +3,13 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Creating a 3000MB file for the first loop device - name: Creating a 500MB file for the first loop device
ansible.builtin.command: dd if=/dev/zero of={{ remote_tmp_dir }}/test_lvm_pv_01.img bs=1M count=3000 ansible.builtin.command: dd if=/dev/zero of={{ remote_tmp_dir }}/test_lvm_pv_01.img bs=1M count=500
args: args:
creates: "{{ remote_tmp_dir }}/test_lvm_pv_01.img" creates: "{{ remote_tmp_dir }}/test_lvm_pv_01.img"
- name: Creating a 4000MB file for the second loop device - name: Creating a 1000MB file for the second loop device
ansible.builtin.command: dd if=/dev/zero of={{ remote_tmp_dir }}/test_lvm_pv_02.img bs=1M count=4000 ansible.builtin.command: dd if=/dev/zero of={{ remote_tmp_dir }}/test_lvm_pv_02.img bs=1M count=1000
args: args:
creates: "{{ remote_tmp_dir }}/test_lvm_pv_02.img" creates: "{{ remote_tmp_dir }}/test_lvm_pv_02.img"
@ -63,12 +63,13 @@
community.general.filesystem: community.general.filesystem:
dev: /dev/vg_tmp_test/lv_tmp_test dev: /dev/vg_tmp_test/lv_tmp_test
fstype: xfs fstype: xfs
state: present
register: fs_creation_result register: fs_creation_result
#- name: Mounting LV lv_tmp_test to {{ remote_tmp_dir }}/tmp_mount #- name: Mounting LV lv_tmp_test to {{ remote_tmp_dir }}/tmp_mount
# ansible.builtin.shell: mount -o rw,noauto /dev/vg_tmp_test/lv_tmp_test {{ remote_tmp_dir }}/tmp_mount # ansible.builtin.shell: mount -o rw,noauto /dev/vg_tmp_test/lv_tmp_test {{ remote_tmp_dir }}/tmp_mount
- name: Mounting LV lv_tmp_test to {{ remote_tmp_dir }}/tmp_mount - name: Mounting LV lv_tmp_test
ansible.posix.mount: ansible.posix.mount:
fstab: '{{ remote_tmp_dir }}/fstab' fstab: '{{ remote_tmp_dir }}/fstab'
path: '{{ remote_tmp_dir }}/tmp_mount' path: '{{ remote_tmp_dir }}/tmp_mount'