Skip to content

Commit 3e7af9d

Browse files
committed
[libvirt_manager] Use /sysroot as path with xfs_growfs
With OCP 4.20 the task fails with:- xfs_growfs: / is not a mounted XFS filesystem As it's changed now:- $ sudo df / --output=fstype Type overlay $ sudo df /sysroot --output=fstype Type xfs while with 4.18 it used to be:- $ df /sysroot --output=fstype Type xfs $ df / --output=fstype Type xfs Changing the command to use /sysroot as path which works on both 4.20 and older OCP versions. Also run the command with unshare --mount in seperate namespace. Signed-off-by: Yatin Karel <[email protected]>
1 parent 1059a0c commit 3e7af9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/libvirt_manager/tasks/manage_vms.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
ansible.builtin.shell:
8585
cmd: >-
8686
ssh core@{{ vm_con_name }}
87-
"sudo growpart /dev/sda {{ _root_part }}; sudo xfs_growfs /;"
87+
"sudo growpart /dev/sda {{ _root_part }}; sudo unshare --mount -- bash -c 'mount -o remount,rw /sysroot && xfs_growfs /sysroot'"
8888
8989
- name: "Manage ssh keys on {{ vm }}"
9090
when:

0 commit comments

Comments
 (0)