linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] partition table needed for lvm ?
@ 2007-03-01 22:14 Chris Hunter
  2007-03-01 23:19 ` Alasdair G Kergon
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Hunter @ 2007-03-01 22:14 UTC (permalink / raw)
  To: linux-lvm

Hi, I am relatively new to lvm.

I am using redhat enterprise 4, which uses "lvm2" as it default volume
manager. We have storage devices (ie SAN) that combine 20-40 disks
together into 4+ TB filesystems. We are investigating using lvm to
manage these disks.

The release notes for "rhel4 update 1" state that you _require_ a
partition table to use lvm2:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/release-notes/as-x86/RELEASE-NOTES-U1-x86-en.html

>� Various issues with LVM2 on large devices are fixed in Red Hat
>Enterprise Linux 4 Update 1. Do not use LVM2 on devices larger than 2
>TB prior to installing Update 1.
>
>As noted above, Red Hat requires that a partition table be written to
>the block device, even when it is used as part of an LVM2 Volume
Group. >In this case, you may create a single partition that spans the
entire >device. Then, be sure to specify the full partition name (for
example, >/dev/sda1, not /dev/sda), when you use the pvcreate and
vgcreate >commands.

According to the lvm HOWTO, lvm can manage disks _without_ partition
tables. In fact I tested this and it appears to work.

Do I reallly need to make partition tables on all my disks to use lvm2 ?

What will happen if I don't use partition tables with lvm ?

Thank-you in advance,

-- 
Chris Hunter

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] partition table needed for lvm ?
  2007-03-01 22:14 [linux-lvm] partition table needed for lvm ? Chris Hunter
@ 2007-03-01 23:19 ` Alasdair G Kergon
  2007-03-02 11:04   ` paddy
  2007-03-02 14:01   ` Luca Berra
  0 siblings, 2 replies; 7+ messages in thread
From: Alasdair G Kergon @ 2007-03-01 23:19 UTC (permalink / raw)
  To: LVM general discussion and development

On Thu, Mar 01, 2007 at 05:14:25PM -0500, Chris Hunter wrote:
> Do I reallly need to make partition tables on all my disks to use lvm2 ?
 
Other packages such as the installer like to have them.

Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] partition table needed for lvm ?
  2007-03-01 23:19 ` Alasdair G Kergon
@ 2007-03-02 11:04   ` paddy
  2007-03-02 14:01   ` Luca Berra
  1 sibling, 0 replies; 7+ messages in thread
From: paddy @ 2007-03-02 11:04 UTC (permalink / raw)
  To: linux-lvm

On Thu, Mar 01, 2007 at 11:19:07PM +0000, Alasdair G Kergon wrote:
> On Thu, Mar 01, 2007 at 05:14:25PM -0500, Chris Hunter wrote:
> > Do I reallly need to make partition tables on all my disks to use lvm2 ?
>  
> Other packages such as the installer like to have them.

surely this is more to do with booting than anything else ?

It certainly used to be the case that the recommended and intended
primary use of LVM was using whole physical volumes (ie: a entire 
hard disk, say /dev/hde rather than /dev/hde1) as PVs (hence the name!)

note that using disks in this way is not the same as not having
partitions on your *boot* volume.

is redhat really so broken ? surely not!

Regards,
Paddy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] partition table needed for lvm ?
  2007-03-01 23:19 ` Alasdair G Kergon
  2007-03-02 11:04   ` paddy
@ 2007-03-02 14:01   ` Luca Berra
  2007-03-02 16:58     ` paddy
  1 sibling, 1 reply; 7+ messages in thread
From: Luca Berra @ 2007-03-02 14:01 UTC (permalink / raw)
  To: linux-lvm

On Thu, Mar 01, 2007 at 11:19:07PM +0000, Alasdair G Kergon wrote:
>On Thu, Mar 01, 2007 at 05:14:25PM -0500, Chris Hunter wrote:
>> Do I reallly need to make partition tables on all my disks to use lvm2 ?
> 
>Other packages such as the installer like to have them.

what about the fact that on many storage creating an ms-dos compatible
partition usually results in screwing io alignment?

Do _NOT_ use partitions, they are evil and should have been shot long
ago.

Regards,
L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] partition table needed for lvm ?
  2007-03-02 14:01   ` Luca Berra
@ 2007-03-02 16:58     ` paddy
  2007-03-03 11:45       ` Luca Berra
  0 siblings, 1 reply; 7+ messages in thread
From: paddy @ 2007-03-02 16:58 UTC (permalink / raw)
  To: linux-lvm

On Fri, Mar 02, 2007 at 03:01:53PM +0100, Luca Berra wrote:
> On Thu, Mar 01, 2007 at 11:19:07PM +0000, Alasdair G Kergon wrote:
> >On Thu, Mar 01, 2007 at 05:14:25PM -0500, Chris Hunter wrote:
> >>Do I reallly need to make partition tables on all my disks to use lvm2 ?
> >
> >Other packages such as the installer like to have them.
> 
> what about the fact that on many storage creating an ms-dos compatible
> partition usually results in screwing io alignment?

interesting.  

Although it comes as no surprise that the CHS boundaries are not aligned
with the hardware anymore (like they were back in the days of say MFM),
I thought that systems that attempted to use this level of information 
about a disk were fairly rare these days ?

> Do _NOT_ use partitions, they are evil and should have been shot long
> ago.

:-)

agreed, there are plenty of reasons to retire msdos partitions.

What would you recommend as a setup for boot drives where the bios
expects to boot from an msdos partition table (or more specifically
the code at the begining of a sector with the magic of an msdos 
partitiontable) on sector 0 ?

<reminisces ...>

back in the days of around LVM 0.7 I patched my LVM to leave a blank
sector at the front of the PV, in the much the same fashion as ext2,
specifically so that I could format an entire boot disk in HM LVM.

I found a number of "bugs" in the userspace tools which didn't account 
for variations in this variable, but were easy enough to fix up.

As I recall, the author wasn't interested in such a modification, and 
warned against booting/swapping on LVM.

one of the problems with this setup (apart from my learning at the time
that you can patch your kernel so far, but eventually with enough
patches it becomes a serious headache :-) was that grub didn't
understand LVM and LILO wants blocks that don't move about, but there
was no way to tell LVM to pin the relevant block in place (not that this
was ever a problem in practice for me).

One of the reasons I felt confident to do this was because I had read
the kernel code, which was exceeding clear and simple.

Of course that code has changed, and I have not kept up, and I have had
one nasty LVM related event in the past few years (couldn't promise you
that it wasn't operator error) and I am much more shy of putting swap 
and root on LVM than I was back then.

Anyway, enough of that! </reminisces>

Regards,
Paddy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] partition table needed for lvm ?
  2007-03-02 16:58     ` paddy
@ 2007-03-03 11:45       ` Luca Berra
  2007-03-06 12:23         ` paddy
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Berra @ 2007-03-03 11:45 UTC (permalink / raw)
  To: linux-lvm

On Fri, Mar 02, 2007 at 04:58:37PM +0000, paddy@panici.net wrote:
>On Fri, Mar 02, 2007 at 03:01:53PM +0100, Luca Berra wrote:
>> On Thu, Mar 01, 2007 at 11:19:07PM +0000, Alasdair G Kergon wrote:
>> >On Thu, Mar 01, 2007 at 05:14:25PM -0500, Chris Hunter wrote:
>> >>Do I reallly need to make partition tables on all my disks to use lvm2 ?
>> >
>> >Other packages such as the installer like to have them.
>> 
>> what about the fact that on many storage creating an ms-dos compatible
>> partition usually results in screwing io alignment?
>
>interesting.  
>
>Although it comes as no surprise that the CHS boundaries are not aligned
>with the hardware anymore (like they were back in the days of say MFM),
>I thought that systems that attempted to use this level of information 
>about a disk were fairly rare these days ?
The problem comes from smart storage system which like to do IO with
big block sizes (usually 32K to 64K) from the beginning of the LUN that
is presented to the OS.
If sda1 starts at 31.5K into sda and we assume 4k as a default block
size and 32K as storage block size we will notice that IO on every 8th
block will require two IOs on the storage.
If we really have to partition it would not hurt knowing the block
size of the storage and manually aligning the start of partition to
that, it might waste a few sectors at the beginning but who cares.

>> Do _NOT_ use partitions, they are evil and should have been shot long
>> ago.
>
>:-)
>
>agreed, there are plenty of reasons to retire msdos partitions.
>
>What would you recommend as a setup for boot drives where the bios
>expects to boot from an msdos partition table (or more specifically
>the code at the begining of a sector with the magic of an msdos 
>partitiontable) on sector 0 ?
Fortunately plain disks (which are mostly used as boot device) does not
suffer from the above mentioned issue. So partitioning them is not that
bad.
Moreover if you have /boot as a separate partition at the beginning of
the disk only that would be affected, the other partitions should be
aligned...

My preference would still be for not having msdos partitions on any drive at all
and, since lvm2 does not touch the first 512 bytes of a PV, fitting a
grub boot block in there is not going to be that difficult.

Regards,
L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] partition table needed for lvm ?
  2007-03-03 11:45       ` Luca Berra
@ 2007-03-06 12:23         ` paddy
  0 siblings, 0 replies; 7+ messages in thread
From: paddy @ 2007-03-06 12:23 UTC (permalink / raw)
  To: linux-lvm

On Sat, Mar 03, 2007 at 12:45:08PM +0100, Luca Berra wrote:
> On Fri, Mar 02, 2007 at 04:58:37PM +0000, paddy@panici.net wrote:
> >On Fri, Mar 02, 2007 at 03:01:53PM +0100, Luca Berra wrote:
> >>On Thu, Mar 01, 2007 at 11:19:07PM +0000, Alasdair G Kergon wrote:
> >>>On Thu, Mar 01, 2007 at 05:14:25PM -0500, Chris Hunter wrote:
> >>>>Do I reallly need to make partition tables on all my disks to use lvm2 ?
> >>>
> >>>Other packages such as the installer like to have them.
> >>
> >>what about the fact that on many storage creating an ms-dos compatible
> >>partition usually results in screwing io alignment?
> >
> >interesting.  
> >
> >Although it comes as no surprise that the CHS boundaries are not aligned
> >with the hardware anymore (like they were back in the days of say MFM),
> >I thought that systems that attempted to use this level of information 
> >about a disk were fairly rare these days ?
> The problem comes from smart storage system which like to do IO with
> big block sizes (usually 32K to 64K) from the beginning of the LUN that
> is presented to the OS.

ah! ok :-)

as you say, this has tended to be less of an issue with boot disks.

> My preference would still be for not having msdos partitions on any drive 
> at all

The question in my mind these days, is "what kinds of failure modes
can/will it exhibit?".

The secret to "optimising failure" seems to be to keep things as simple as
possible.  I think it will depend on what you're doing and exactly how
you are doing it whether one is simpler than the other, but I'd be
especially wary of an approach to the problem that neglects this
question.  If nothing else, you get some different options for ways to
shoot yourself in the foot ;-)

Having said that, as you can tell from my previous mail, I have a real
soft spot for the idea of ditching dos partitions and using LVM instead.

> and, since lvm2 does not touch the first 512 bytes of a PV, fitting a
> grub boot block in there is not going to be that difficult.

I didn't realise that had gotten done in the end. 
Can't tell you how happy it makes me :-)

Think I'll go and reformat a disk to celebrate! :-)

Don't suppose anyone put in support to stop things getting moved
about by accident that shouldn't ?

Regards,
Paddy

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-03-06 12:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 22:14 [linux-lvm] partition table needed for lvm ? Chris Hunter
2007-03-01 23:19 ` Alasdair G Kergon
2007-03-02 11:04   ` paddy
2007-03-02 14:01   ` Luca Berra
2007-03-02 16:58     ` paddy
2007-03-03 11:45       ` Luca Berra
2007-03-06 12:23         ` paddy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).