Which command would accurately create a 19 G logical volume named galactica in the battlestar volume group using /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 would accurately create a 19 G logical volume named galactica in the battlestar volume group using /dev/xvdf1?

Explanation:
Creating a logical volume in LVM involves choosing the volume group, naming the new LV, and setting its size. The command format typically uses the LV size with -L, the LV name with -n, and then the volume group name. Here you want a 19G LV named galactica inside the battlestar volume group, which already contains the physical device /dev/xvdf1. By specifying the LV name and size and then the VG name, you target the battlestar group and assign the name galactica to the new logical volume. This results in a device like /dev/mapper/battlestar-galactica and uses the free space from the battlestar VG. Omitting the LV name would leave the new logical volume without a deterministic name. Placing the volume group name as the LV name and the LV name as the VG name flips the roles, attempting to create a logical volume named battlestar in a volume group named galactica, which isn’t correct for the requested outcome. Referencing the physical device path directly (like /dev/xvdf1) is less explicit than naming the target volume group, and while it can work in some contexts, using the VG name keeps the command clear and unambiguous.

Creating a logical volume in LVM involves choosing the volume group, naming the new LV, and setting its size. The command format typically uses the LV size with -L, the LV name with -n, and then the volume group name. Here you want a 19G LV named galactica inside the battlestar volume group, which already contains the physical device /dev/xvdf1. By specifying the LV name and size and then the VG name, you target the battlestar group and assign the name galactica to the new logical volume. This results in a device like /dev/mapper/battlestar-galactica and uses the free space from the battlestar VG.

Omitting the LV name would leave the new logical volume without a deterministic name. Placing the volume group name as the LV name and the LV name as the VG name flips the roles, attempting to create a logical volume named battlestar in a volume group named galactica, which isn’t correct for the requested outcome. Referencing the physical device path directly (like /dev/xvdf1) is less explicit than naming the target volume group, and while it can work in some contexts, using the VG name keeps the command clear and unambiguous.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy