On Mon, 2008-06-09 at 12:19 -0700, Collins, Kevin [Beeline] wrote: > Hi, > > My question is, what is the best practice in Linux? Do most folks > create a partition table for each LUN, even when used as a physical > volume for LVM. It seems weird to me that I would have: > > /dev/mpath/disk0p2 > /dev/mpath/disk1 > /dev/mpath/disk2 > /dev/mpath/disk3 > /dev/mpath/disk4 > > as PVs - seems it would be more consistent to create them all as: > > /dev/mpath/disk0p1 > /dev/mpath/disk1p1 > /dev/mpath/disk2p1 > /dev/mpath/disk3p1 > /dev/mpath/disk4p1 > > I'm used to LVM in HP-UX (what the original Sistina LVM was based on), > where we always use whole (aka, non-partitioned) disks... > I think "best practice" has changed over the years. Older Redhat and Linux LVM docs used to lean toward using entire disks/LUNs, however, most modern docs seem to suggest a single partition. Here's a reference from Redhat:
https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Cluster_Logical_Volume_Manager/multiple_partitions.html Although that section claims to be about multiple partition, it's first sentence is "It is generally recommended that you create a single partition that covers the whole disk to label as an LVM physical volume..." and then goes on to give some reasons. Also, in the Installing RHEL document it states the following: "To create an LVM logical volume, you must first create partitions of type physical volume (LVM). Once you have created one or more physical volume (LVM) partitions, select LVM to create an LVM logical volume." This implies Redhat seems to think that creating a partition is a good idea. And finally from the LVM Howto we get this: 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. Back when we started using LVM with RHEL3 we chose to use entire LUN's, thus caused us much grief with upgrades as at least some versions of anaconda seem to think that a disk with no partition table must be blank and prompts you to "initialize" them. On a system with many LUN's this can be quite annoying. We've since switched to creating paritions of type 8e (Linux LVM) on all of our LUN's. In the end, both options worked fine for us (just as the note describes), but having a partition seemed to be a little better from an administrative perspective and certainly eased the pain of upgrades by eliminating annoying error messages about uninitialized disks during the process. We've also had a few monitoring tools which report errors when disks don't have partition tables. They sent out critical alerts that the "partition table is corrupt". Later, Tom _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
