0

I am a newbie on LVM management trying to learn how to create new logical volumes.

This is what I understand on how to do it:
(Just want to make sure I understand it correct.)

  1. create partitions on a new disk
  2. format them (or I do not need to?)
  3. create new physical volumes on the disk
  4. add physical volumes to a new or an existing volume group
  5. create new logical volumes based on free space of volume group
  6. format logical volumes

Here are my question:

  1. When and why do I want to create multiple partitions on one disk?
    I understand I need to create separate boot partition, but that's about it, isn' it?

  2. When and why do I want to create multiple physical volumes on one disk?

  3. How come boot partition does not need to be a physical volume?

  4. When and why do I want to create new volumes groups?
    One volume group seems working for me.

Thanks.

1

When and why do I want to create multiple partitions on one disk? I understand I need to create separate boot partition, but that's about it, isn' it?

It is mostly due to maintenance need, e.g.: need to take a mount point off-line. Since the root (/) cannot be taken off-line while the system is live, so it is preferable have a partition for each mount point.

Another reason is to avoid single point of failure, if there are multiple applications on server, and they are installed on their own mount point. When one mount point is failing (disk space, performance problem), the other applications would not be affected.

When and why do I want to create multiple physical volumes on one disk?

It is a matter of preference. When a storage LUN is extended and you need to accomodate the new space on OS. You option can either be resizing existing PV, or to create new PV. I prefer the latter approach as it is conservative (no change on existing PV), and convenient (pvresize takes time).

How come boot partition does not need to be a physical volume?

As /boot will be addressed by grub at boot time. I do not think grub can access /boot if it is on LVM. The LVM driver might be too large fit in stage 1.5 of GRUB.

When and why do I want to create new volumes groups? One volume group seems working for me.

VG can be treated as a physical disk, it is always advisable to have a seperate disk for different applications. It shares the same principal as question 1.

  • @Alix Lam VG can be treated as a physical disk, then what about logical volumes? Are they like the partitions on the disk? – Xin Nov 14 '14 at 8:35
  • yes, LVs can be seen as just partitions. In fact, VG is just an abstraction layer, it is used manage the many to many relationship between partitions and disks. – Alex Lam Nov 15 '14 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.