All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dieter Stüken" <stueken@conterra.de>
To: mauelshagen@redhat.com,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
Date: Fri, 09 Jun 2006 13:36:07 +0200	[thread overview]
Message-ID: <44895D27.50107@conterra.de> (raw)
In-Reply-To: <20060605223153.GA21795@redhat.com>

Heinz Mauelshagen wrote:
> On Sun, Jun 04, 2006 at 10:46:45AM -0400, Mag Gam wrote:
>> Is it better to create 1 partition on a disk, and use that into the LVM, or
>> have a blank disk, and use that in the LVM (if possible)?
> 
> As long as we still need to live with partition tables, the advantage
> of having 1 partition to create a PV on it is, that all related tools
> (e.g. parted) *show* that there's an LVM partition.
> 
> Without a partition table on the device, it is easier to overlook that
> the device is being used by LVM.
> 
> Of course LVM tools such as 'pvscan' or 'pvs' will show that fact.
> 
> Having said that, it is up to you to go without the technically superfluous
> partition table on an LVM-only device or not.

But, using a partition introduces some odd offset between physical and logical
sector numbers. In general this does not matter, but if the underlaying
device is a raid array, you may gain some performance, if the PE's are 
aligned with the underlaying stripe set. Also any embedded EXT2 system
may profit from this (see: -E stride).

But I don't think we "still need to live with partition tables" for ever.
If I have a look at GPT or LDM, they overcome the partition table by degrading
it to a protective dummy partition. It's only purpose is to defend against fdisk.
Thus the PV is no longer part of a partitioned disk. Instead LVM takes over
the whole disk and the "partition" becomes a dummy part of the PV.
Also the partition Id must NOT be 0x8E. Until the kernel is aware about this,
it will show up both sda and sda1. LVM, however, should correctly choose sda
over sda1 as the "sector_xl" entry won't match for sda1.

I think this concept may even be driven further towards booting from LVM.
The first boot sector may never contain any LVM aware logic. But instead
of reserving some space outside LVM, why not provide the necessary space
INSIDE lvm? I may reserve the first PE (or PEs) for a regular LV to hold /boot.
The boot-sector just has to point to it and loads the kernel and initrd.
The kernel will then load the VG to mount its root from LVM.
Thus the boostrap code (i.e. grub) does not need to know too much about LVM.
(may be the installation procedure has to...)

does this make any sense?

Regards, Dieter.

  parent reply	other threads:[~2006-06-09 11:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-04 14:46 [linux-lvm] Is it better to use partitions or entire disk for LVM? Mag Gam
2006-06-05 22:31 ` Heinz Mauelshagen
2006-06-05 22:43   ` Mario Becroft (mailing list)
2006-06-05 22:58     ` Joep Blom
2006-06-09  8:31     ` Zac Slade
2006-06-09 11:36   ` Dieter Stüken [this message]
2006-06-09 18:44     ` Luca Berra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44895D27.50107@conterra.de \
    --to=stueken@conterra.de \
    --cc=linux-lvm@redhat.com \
    --cc=mauelshagen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.