Which command extends the logical volume /dev/battlestar/galactica by +20G?

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 extends the logical volume /dev/battlestar/galactica by +20G?

Explanation:
Extending a logical volume by a specific amount uses a plus sign to indicate an increase. The command lvextend -L +20G /dev/battlestar/galactica takes the current size of the LV and adds 20G to it, giving you a larger volume without guessing a new total size. If you instead used -L 20G, you’d be setting the LV to exactly 20G in total, which could shrink it if it was already bigger. Using -L -20G would shrink the LV by 20G, not extend it. While lvresize can also extend with +20G, using lvextend with the incremental form is the standard way to grow a logical volume in this context. After extending the LV, don’t forget to grow the filesystem to use the new space (specific command depends on the filesystem in use).

Extending a logical volume by a specific amount uses a plus sign to indicate an increase. The command lvextend -L +20G /dev/battlestar/galactica takes the current size of the LV and adds 20G to it, giving you a larger volume without guessing a new total size. If you instead used -L 20G, you’d be setting the LV to exactly 20G in total, which could shrink it if it was already bigger. Using -L -20G would shrink the LV by 20G, not extend it. While lvresize can also extend with +20G, using lvextend with the incremental form is the standard way to grow a logical volume in this context. After extending the LV, don’t forget to grow the filesystem to use the new space (specific command depends on the filesystem in use).

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy