4 added some followup to @joel's comments
source | link

Follow-up #1 (To @Joel's comments)

I thought the above 2 guides were 2 pretty good reasons. They're both official guides, one from RH the other a Howto put together by the LVM team.

Here's another reason. By not partitioning the HDD, no ID is being explicitly set on the HDD to clearly identify how it's being used.

 fdisk -l
 ...
/dev/sda6       318253056   956291071   319019008   8e  Linux LVM

As an administrator of systems, it's much more obvious to myself and others the intent of how this particular drive is being used vs. without the 8e.

I appreciate what you're saying @Joel, I too worked at a fortune 500 company where we had 100's of Linux deployments in both desktop/server physical/virtual deployments, as well as in large storage deployments, so I get what you're saying.

Follow-up #1 (To @Joel's comments)

I thought the above 2 guides were 2 pretty good reasons. They're both official guides, one from RH the other a Howto put together by the LVM team.

Here's another reason. By not partitioning the HDD, no ID is being explicitly set on the HDD to clearly identify how it's being used.

 fdisk -l
 ...
/dev/sda6       318253056   956291071   319019008   8e  Linux LVM

As an administrator of systems, it's much more obvious to myself and others the intent of how this particular drive is being used vs. without the 8e.

I appreciate what you're saying @Joel, I too worked at a fortune 500 company where we had 100's of Linux deployments in both desktop/server physical/virtual deployments, as well as in large storage deployments, so I get what you're saying.

3 added lvm howto reference
source | link

RHEL6 LVM Admin Guide

According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it:

excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide"

2.1.2. Multiple Partitions on a Disk

LVM allows you to create physical volumes out of disk partitions. It is It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:

Administrative convenience

It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot-up.

LVM Howto

Section 11.1. Initializing disks or disk partitions of the LVM Howto states as follows:

excerpt from the LVM Howto

For entire disks:

Run pvcreate on the disk:

# pvcreate /dev/hdb

This creates a volume group descriptor at the start of disk.

Not Recommended

Using the whole disk as a PV (as opposed to a partition spanning the whole disk) is not recommended because of the management issues it can create. Any other OS that looks at the disk will not recognize the LVM metadata and display the disk as being free, so it is likely it will be overwritten. LVM itself will work fine with whole disk PVs.

If you get an error that LVM can't initialize a disk with a partition table on it, first make sure that the disk you are operating on is the correct one. If you are very sure that it is, run the following:

DANGEROUS

The following commands will destroy the partition table on the disk being operated on. Be very sure it is the correct disk.

# dd if=/dev/zero of=/dev/diskname bs=1k count=1
# blockdev --rereadpt /dev/diskname

Conclusions

These are the primary sources I would trust in determining whether you should format a single partition on a HDD prior to adding it as a physical volume or not. As other answers have indicated (and comments) you wouldn't be wrong in just adding the entire drive without a partition.

To me I liken it to driving in my car with my seat-belt on. If you never get in an accident then the seat-belt has served no purpose, but if I ever do get in an accident I"m sure glad I was wearing it.

RHEL6 LVM Admin Guide

According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it:

excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide"

2.1.2. Multiple Partitions on a Disk

LVM allows you to create physical volumes out of disk partitions. It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:

Administrative convenience

It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot-up.

LVM Howto

Section 11.1. Initializing disks or disk partitions of the LVM Howto states as follows:

excerpt from the LVM Howto

For entire disks:

Run pvcreate on the disk:

# pvcreate /dev/hdb

This creates a volume group descriptor at the start of disk.

Not Recommended

Using the whole disk as a PV (as opposed to a partition spanning the whole disk) is not recommended because of the management issues it can create. Any other OS that looks at the disk will not recognize the LVM metadata and display the disk as being free, so it is likely it will be overwritten. LVM itself will work fine with whole disk PVs.

If you get an error that LVM can't initialize a disk with a partition table on it, first make sure that the disk you are operating on is the correct one. If you are very sure that it is, run the following:

DANGEROUS

The following commands will destroy the partition table on the disk being operated on. Be very sure it is the correct disk.

# dd if=/dev/zero of=/dev/diskname bs=1k count=1
# blockdev --rereadpt /dev/diskname

RHEL6 LVM Admin Guide

According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it:

excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide"

2.1.2. Multiple Partitions on a Disk

LVM allows you to create physical volumes out of disk partitions. It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:

Administrative convenience

It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot-up.

LVM Howto

Section 11.1. Initializing disks or disk partitions of the LVM Howto states as follows:

excerpt from the LVM Howto

For entire disks:

Run pvcreate on the disk:

# pvcreate /dev/hdb

This creates a volume group descriptor at the start of disk.

Not Recommended

Using the whole disk as a PV (as opposed to a partition spanning the whole disk) is not recommended because of the management issues it can create. Any other OS that looks at the disk will not recognize the LVM metadata and display the disk as being free, so it is likely it will be overwritten. LVM itself will work fine with whole disk PVs.

If you get an error that LVM can't initialize a disk with a partition table on it, first make sure that the disk you are operating on is the correct one. If you are very sure that it is, run the following:

DANGEROUS

The following commands will destroy the partition table on the disk being operated on. Be very sure it is the correct disk.

# dd if=/dev/zero of=/dev/diskname bs=1k count=1
# blockdev --rereadpt /dev/diskname

Conclusions

These are the primary sources I would trust in determining whether you should format a single partition on a HDD prior to adding it as a physical volume or not. As other answers have indicated (and comments) you wouldn't be wrong in just adding the entire drive without a partition.

To me I liken it to driving in my car with my seat-belt on. If you never get in an accident then the seat-belt has served no purpose, but if I ever do get in an accident I"m sure glad I was wearing it.

2 added lvm howto reference
source | link

RHEL6 LVM Admin Guide

According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it:

excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide"

2.1.2. Multiple Partitions on a Disk

LVM allows you to create physical volumes out of disk partitions. It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:

Administrative convenience

It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot-up.

LVM Howto

Section 11.1. Initializing disks or disk partitions of the LVM Howto states as follows:

excerpt from the LVM Howto

For entire disks:

Run pvcreate on the disk:

# pvcreate /dev/hdb

This creates a volume group descriptor at the start of disk.

Not Recommended

Using the whole disk as a PV (as opposed to a partition spanning the whole disk) is not recommended because of the management issues it can create. Any other OS that looks at the disk will not recognize the LVM metadata and display the disk as being free, so it is likely it will be overwritten. LVM itself will work fine with whole disk PVs.

If you get an error that LVM can't initialize a disk with a partition table on it, first make sure that the disk you are operating on is the correct one. If you are very sure that it is, run the following:

DANGEROUS

The following commands will destroy the partition table on the disk being operated on. Be very sure it is the correct disk.

# dd if=/dev/zero of=/dev/diskname bs=1k count=1
# blockdev --rereadpt /dev/diskname

According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it:

excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide"

2.1.2. Multiple Partitions on a Disk

LVM allows you to create physical volumes out of disk partitions. It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:

Administrative convenience

It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot-up.

RHEL6 LVM Admin Guide

According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it:

excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide"

2.1.2. Multiple Partitions on a Disk

LVM allows you to create physical volumes out of disk partitions. It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume for the following reasons:

Administrative convenience

It is easier to keep track of the hardware in a system if each real disk only appears once. This becomes particularly true if a disk fails. In addition, multiple physical volumes on a single disk may cause a kernel warning about unknown partition types at boot-up.

LVM Howto

Section 11.1. Initializing disks or disk partitions of the LVM Howto states as follows:

excerpt from the LVM Howto

For entire disks:

Run pvcreate on the disk:

# pvcreate /dev/hdb

This creates a volume group descriptor at the start of disk.

Not Recommended

Using the whole disk as a PV (as opposed to a partition spanning the whole disk) is not recommended because of the management issues it can create. Any other OS that looks at the disk will not recognize the LVM metadata and display the disk as being free, so it is likely it will be overwritten. LVM itself will work fine with whole disk PVs.

If you get an error that LVM can't initialize a disk with a partition table on it, first make sure that the disk you are operating on is the correct one. If you are very sure that it is, run the following:

DANGEROUS

The following commands will destroy the partition table on the disk being operated on. Be very sure it is the correct disk.

# dd if=/dev/zero of=/dev/diskname bs=1k count=1
# blockdev --rereadpt /dev/diskname
1
source | link