EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 39


SIMULATION -

Create a logical volume -

Create a new logical volume as required:

Name the logical volume as database, belongs to datastore of the volume group, size is 50 PE.

Expansion size of each volume in volume group datastore is 16MB.

Use ext3 to format this new logical volume, this logical volume should automatically mount to /mnt/database

Show Answer
Correct Answer:

First, create a physical volume on the desired partition: 'pvcreate /dev/sdxx'. Then, create a volume group with a physical extent size of 16MB: 'vgcreate -s 16M datastore /dev/sdxx'. Next, create the logical volume within this volume group: 'lvcreate -l 50 -n database datastore'. Format the new logical volume with the ext3 filesystem: 'mkfs.ext3 /dev/datastore/database'. Create a mount point directory: 'mkdir /mnt/database'. Add the new logical volume to the fstab file for automatic mounting: 'echo "/dev/datastore/database /mnt/database ext3 defaults 0 0" >> /etc/fstab'. Finally, mount the logical volume: 'mount -a'.

Discussion

1 comment
Sign in to comment
ionix
Apr 2, 2021

# vgcreate -s 16M datastore /dev/sdxx # lvcreate -l 50 -n database datastore # lvs # mkdir /mnt/database # mkfs.ext3 /dev/datastore/database # echo "/dev/datastore/database /mnt/database/ ext3 defaults 0 0" >> /etc/fstab # mount -a # df -h