Which command creates a volume group named battlestar from the physical volumes /dev/xvdf1 and /dev/xvdg1?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command creates a volume group named battlestar from the physical volumes /dev/xvdf1 and /dev/xvdg1?

Explanation:
In LVM, a volume group is formed by combining one or more physical volumes into a single pool. To create a volume group named battlestar from the devices /dev/xvdf1 and /dev/xvdg1, you use the command that names the group and lists the physical volumes: vgcreate battlestar /dev/xvdf1 /dev/xvdg1. This tells the system to assemble those two PVs into a new VG called battlestar. It’s common to prepare the devices as physical volumes first with pvcreate, but the actual creation of the group is done by vgcreate. After this, you can create a logical volume inside the battlestar VG with something like lvcreate -n galactica -L 20G battlestar, which would create /dev/battlestar/galactica. You’d then format that LV with mkfs as needed, for example mkfs -t xfs /dev/battlestar/galactica. The other options don’t form a volume group: pvcreate initializes PVs, lvcreate makes a logical volume within an existing VG, and mkfs formats a filesystem on a block device.

In LVM, a volume group is formed by combining one or more physical volumes into a single pool. To create a volume group named battlestar from the devices /dev/xvdf1 and /dev/xvdg1, you use the command that names the group and lists the physical volumes: vgcreate battlestar /dev/xvdf1 /dev/xvdg1. This tells the system to assemble those two PVs into a new VG called battlestar. It’s common to prepare the devices as physical volumes first with pvcreate, but the actual creation of the group is done by vgcreate.

After this, you can create a logical volume inside the battlestar VG with something like lvcreate -n galactica -L 20G battlestar, which would create /dev/battlestar/galactica. You’d then format that LV with mkfs as needed, for example mkfs -t xfs /dev/battlestar/galactica.

The other options don’t form a volume group: pvcreate initializes PVs, lvcreate makes a logical volume within an existing VG, and mkfs formats a filesystem on a block device.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy