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.
SIMULATION - Create a 512M partition, make it as ext4 file system, mounted automatically under /mnt/data and which take effect automatically at boot-start.
#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
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!
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.
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
...
...
...
Log in to ExamTopics
Sign in:
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.
nickoftime
Highly Voted 2 years, 11 months agochyaba
2 years, 7 months agokenkct
Most Recent 2 years agoSTFN2019
2 years, 6 months agopipolo1113
3 years agoRedQuasar
3 years, 3 months agoSameer
3 years, 3 months agoRoldo97
3 years, 2 months ago