Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam EX200 topic 1 question 17 discussion

Actual exam question from RedHat's EX200
Question #: 17
Topic #: 1
[All EX200 Questions]

SIMULATION -
Create a 512M partition, make it as ext4 file system, mounted automatically under /mnt/data and which take effect automatically at boot-start.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# fdisk /dev/vda
n
+512M
w
# partprobe /dev/vda
# mkfs -t ext4 /dev/vda5
# mkdir -p /data
# vim /etc/fstab
/dev/vda5 /data ext4 defaults 0 0
# mount -a

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
nickoftime
Highly Voted 2 years, 11 months ago
lsblk (checkin empty disk) parted /dev/vdb mkpart primary ext4 2048s 512MB udevadm settle mkfs.ext4 /dev/vdb1 lsblk --fs(fp..whatever u can get UUID.. for /dev/vdb1 ) append /etc/fstab UUID=xxxx /mnt/data ext4 defaults 0 0 systemctl daemon-reload mount -a
upvoted 5 times
chyaba
2 years, 7 months ago
I think "parted /dev/vdb mkpart primary ext4 2048s 513MB" is correct. size will be 512MB
upvoted 3 times
...
...
kenkct
Most Recent 2 years ago
#sudo su #lsblk -psf (to check for empty disk) #fdisk /dev/sd[] (format disk in question) #n (new partition) #p (for primary) #Enter (use the first sector by default) #+size 512M (to specify the size) #Enter #w (to write the changes) #lsblk -psf(to verify partition has been created) #mkfs.ext4 /dev/sd[]1 (to format the partition with ext4 file system) #mkdir /mnt/data (to create the mount point) #lsblk -psf (to show the UUID for the newly created file system) #echo 'UUID=XXX /mnt/data ext4 defaults 0 0' >> /etc/fstab #systemctl daemon-reload #mount -a
upvoted 3 times
...
STFN2019
2 years, 6 months ago
Another solution to this is to use fdisk utility so: #fdisk -l (to check for empty disk) #fdisk /dev/sdd (format disk in question) #n (new partition) #p (for primary) #Enter (use the first sector by default) #+size 512M (to specify the size) #Enter #w (to write the changes) #fdisk -l /dev/sdd1 (to verify partition has been created) #mkfs.ext4 /dev/sdd1 (to format the partition with ext4 file system) #mkdir /mnt/data (to create the mount point) #mount /dev/sdd1 (mount the partition) #vi /etc/fstab (to configure auto mount after each boot) Press Shift G to go to the last line and press O to start in new line in Insert mode. Enter the following (ensure you press TAB for each part of the entry): /dev/sdd1 /mnt/data /ext4 defaults 0 0 Exit out of the Insert mode and type: :wq! Job done!
upvoted 4 times
...
pipolo1113
3 years ago
And finally: systemctl daemon-reload mount -a
upvoted 2 times
...
RedQuasar
3 years, 3 months ago
parted /dev/sda mkpart primary 2048s 512M mkfs.ext4 /dev/sda1 mkdir /mnt/data2 lsblk -pf (UUID= 36721aac-2a8a-457f-927c-446bbb805753) echo “UUID= 36721aac-2a8a-457f-927c-446bbb805753 /mnt/data2 ext4 defaults 0 0” >> /etc/fstab
upvoted 2 times
Sameer
3 years, 3 months ago
Hi RedQuasar, was going thru ur comment and the answer posted with question. Refered to exam preparation guide of RHCSA 8 and realised i can still use the method written in the answer. Your answer is right but the provided answer is also acceptable. Can u guide if i choose the above answer or the method with answer is correct.
upvoted 1 times
Roldo97
3 years, 2 months ago
Hi Sameer. In the exam, you can use any tool that you prefer to make partitions on block devices (gdisk, fdisk, parted). The only exception may be, when thay ask you tu use an specific partition table for de device. In example: If the question says that you must use a GUID partition table, you'll be forced to use parted o gdisk.
upvoted 2 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...