Which command creates a new volume group using a physical volume?

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 new volume group using a physical volume?

Explanation:
To make a new volume group from a physical volume, you use the vgcreate command. It defines the volume group name and attaches one or more physical volumes to it. In this scenario, the correct usage is to name the volume group battlestar and attach the physical volume /dev/xvdf1, which is exactly what the command vgcreate battlestar /dev/xvdf1 does. The other commands serve different purposes: pvcreate initializes a disk or partition as a physical volume, which is a preparatory step and not the creation of the volume group itself. lvcreate creates a logical volume inside an existing volume group, not the group. Also, you need an existing volume group to host logical volumes, so an LV cannot be created in a non-existent VG. If /dev/xvdf1 isn’t yet a physical volume, pvcreate would be needed first, and then vgcreate would attach that PV to a new VG.

To make a new volume group from a physical volume, you use the vgcreate command. It defines the volume group name and attaches one or more physical volumes to it. In this scenario, the correct usage is to name the volume group battlestar and attach the physical volume /dev/xvdf1, which is exactly what the command vgcreate battlestar /dev/xvdf1 does.

The other commands serve different purposes: pvcreate initializes a disk or partition as a physical volume, which is a preparatory step and not the creation of the volume group itself. lvcreate creates a logical volume inside an existing volume group, not the group. Also, you need an existing volume group to host logical volumes, so an LV cannot be created in a non-existent VG. If /dev/xvdf1 isn’t yet a physical volume, pvcreate would be needed first, and then vgcreate would attach that PV to a new VG.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy