Which command creates a new physical volume suitable for LVM on a disk such as /dev/xvdf1?

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 physical volume suitable for LVM on a disk such as /dev/xvdf1?

Explanation:
Initializing a disk as a physical volume is the first step when using LVM. pvcreate writes the LVM metadata to /dev/xvdf1, turning it into a physical volume that can be added to a volume group. Without this initialization, the device cannot participate in LVM, so commands to create a volume group or logical volumes would fail. The other options either attempt to create a filesystem directly on the device (which bypasses LVM and is not how LVM is used) or try to build a volume group or logical volume without an initialized PV or an existing VG in place. After pvcreate, you would typically use vgcreate or vgextend to form or extend a volume group, and then lvcreate to allocate a logical volume within that VG. So the correct approach to prepare /dev/xvdf1 for LVM is to run pvcreate /dev/xvdf1.

Initializing a disk as a physical volume is the first step when using LVM. pvcreate writes the LVM metadata to /dev/xvdf1, turning it into a physical volume that can be added to a volume group. Without this initialization, the device cannot participate in LVM, so commands to create a volume group or logical volumes would fail. The other options either attempt to create a filesystem directly on the device (which bypasses LVM and is not how LVM is used) or try to build a volume group or logical volume without an initialized PV or an existing VG in place. After pvcreate, you would typically use vgcreate or vgextend to form or extend a volume group, and then lvcreate to allocate a logical volume within that VG. So the correct approach to prepare /dev/xvdf1 for LVM is to run pvcreate /dev/xvdf1.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy