nerdexam
Red_HatRed_Hat

EX294 · Question #19

EX294 Question #19: Real Exam Question with Answer & Explanation

Sign in or unlock EX294 to reveal the answer and full explanation for question #19. The question stem and answer options stay visible for context.

Submitted by daniela_cl· Apr 18, 2026Use Ansible Modules for System Administration

Question

19. Create partitions (randomly selected with Question 9: creating logical volumes) Choose either partitions or LVM to complete. On the balancers host, perform partitioning: (1) Create a new partition on /dev/vdb, partition number 1, size 1500 MB, format it as ext4, and mount it to the /newpart1 directory. If there is not enough space, create a 800 MB partition instead. (Exam environment: /dev/vdb size is 2 GB.) (2) Create a new partition on /dev/vdc, partition number 1, size 1500 MB, format it as ext4, and mount it to the /newpart2 directory. If there is not enough space, create a 800 MB partition instead. (Exam environment: /dev/vdc size is 1 GB.) (3) If the volume group vdd does not exist, an error message should be displayed: Volume group vdd not exist Exam note: First check the target node to see which disk has enough space for 1500 MB, and perform that one first. For example, if /dev/vdc has enough space for 1500 MB, then the block of tasks should first partition /dev/vdc. Explanation/Reference: Solution: - name: partition hosts: balancers tasks: - name: Create a directory1 ansible.builtin.file: name: /newpart1 state: directory - name: Create a directory2 ansible.builtin.file: name: /newpart2 state: directory - block: - name: device vdc 1500M community.general.parted: device: /dev/vdc number: 1 state: present part_end: 1500MiB - name: ext4 vdc filesystem community.general.filesystem: fstype: ext4 dev: /dev/vdc1 ansible.posix.mount: path: /newpart2 src: /dev/vdc1 fstype: ext4 state: mounted - name: device vdb 1500M community.general.parted: device: /dev/vdb number: 1 state: present part_end: 1500MiB - name: ext4 vdb filesystem community.general.filesystem: fstype: ext4 dev: /dev/vdb1 - name: mount vdb ansible.posix.mount: path: /newpart1 src: /dev/vdb1 fstype: ext4 state: mounted rescue: - debug: msg: Could not create partation of that size - name: device vdb 800M community.general.parted: device: /dev/vdb number: 1 state: present part_end: 800MiB when: ansible_facts.devices.vdb is defined - name: ext4 vdb filesystem community.general.filesystem: fstype: ext4 dev: /dev/vdb1 when: ansible_facts.devices.vdb is defined - name: mount vdb ansible.posix.mount: path: /newpart1 src: /dev/vdb1 fstype: ext4 state: mounted when: ansible_facts.devices.vdb is defined - name: device vdc 800M community.general.parted: device: /dev/vdc number: 1 state: present part_end: 800MiB when: ansible_facts.devices.vdc is defined - name: ext4 vdc filesystem community.general.filesystem: fstype: ext4 dev: /dev/vdc1 when: ansible_facts.devices.vdc is defined - name: mount vdc ansible.posix.mount: path: /newpart2 src: /dev/vdc1 fstype: ext4 state: mounted when: ansible_facts.devices.vdd is undefined [greg@control ansible]$ ansible-navigator run partition.yml -m stdout

Unlock EX294 to see the answer

You've previewed enough free EX294 questions. Unlock EX294 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Disk partitioning#Filesystem management#Ansible modules#Conditional execution
Full EX294 PracticeBrowse All EX294 Questions