0

I learnt yesterday that I could pvcreate directly on /dev/sdb instead of /dev/sdb1. I thought that you could only pvcreate on a existing partition. Doing it on a partition adds a level and operations so what are the benefits of creating a partition before doing pvcreate?

Pozinux
  • 1,365

1 Answers1

3

There are two reasons to do so.

  1. If the partition does not allocate 100% of the space of the device, this allows you to assign only a part of the device to LVM, hence leaving the rest of the device available for other uses.

  2. In the case of a partition allocating all the device space, the reason is that if the disk is accessed by other non-Linux OSes, they might not recognize LVM and see the unpartitioned disk as a clean slate. Making a partition on it signals that the disk is being used for something.

dr_
  • 29,602