Which command initializes a device as a new physical volume for LVM?

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 initializes a device as a new physical volume for LVM?

Explanation:
In LVM, you must first turn a block device into a physical volume before you can use it in a volume group. The command that does this exact initialization is pvcreate on the device. It writes the LVM metadata to the disk, marking it as a physical volume so it can participate in a volume group. After that, you would typically create a volume group with vgcreate using the initialized PV, and then create logical volumes inside that group with lvcreate. The other commands perform different tasks: vgcreate builds a volume group from already-initialized physical volumes; lvcreate makes a logical volume inside an existing volume group; pvresize enlarges or reduces the size of an existing physical volume but does not initialize a brand-new device.

In LVM, you must first turn a block device into a physical volume before you can use it in a volume group. The command that does this exact initialization is pvcreate on the device. It writes the LVM metadata to the disk, marking it as a physical volume so it can participate in a volume group. After that, you would typically create a volume group with vgcreate using the initialized PV, and then create logical volumes inside that group with lvcreate. The other commands perform different tasks: vgcreate builds a volume group from already-initialized physical volumes; lvcreate makes a logical volume inside an existing volume group; pvresize enlarges or reduces the size of an existing physical volume but does not initialize a brand-new device.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy