linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Is it better to use partitions or entire disk for LVM?
@ 2006-06-04 14:46 Mag Gam
  2006-06-05 22:31 ` Heinz Mauelshagen
  0 siblings, 1 reply; 7+ messages in thread
From: Mag Gam @ 2006-06-04 14:46 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

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)?

TIA

[-- Attachment #2: Type: text/html, Size: 154 bytes --]

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

* Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
  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-09 11:36   ` Dieter Stüken
  0 siblings, 2 replies; 7+ messages in thread
From: Heinz Mauelshagen @ 2006-06-05 22:31 UTC (permalink / raw)
  To: LVM general discussion and development

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.

> 
> TIA

> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Storage Development                               56242 Marienrachdorf
                                                  Germany
Mauelshagen@RedHat.com                            PHONE +49  171 7803392
                                                  FAX   +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

* Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
  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
  1 sibling, 2 replies; 7+ messages in thread
From: Mario Becroft (mailing list) @ 2006-06-05 22:43 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, 2006-06-06 at 00:31 +0200, 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.

Another reason for creating a partition (perhaps a silly one, but I have
found it useful) is that discs from different vendors (or even the same
vendor) that are supposedly the same size often vary slightly, so I find
it useful to create a partition slightly smaller than the total size of
the disc. This is a little wasteful of space, but means that if I need
to drop in a replacement disc that is slightly smaller than the original
one, I can just copy an image of the old disc and it will generally
work--otherwise I would have to fiddle around with whatever was near the
end of the old disc.

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

* Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
  2006-06-05 22:43   ` Mario Becroft (mailing list)
@ 2006-06-05 22:58     ` Joep Blom
  2006-06-09  8:31     ` Zac Slade
  1 sibling, 0 replies; 7+ messages in thread
From: Joep Blom @ 2006-06-05 22:58 UTC (permalink / raw)
  To: LVM general discussion and development

Mario Becroft (mailing list) wrote:

>On Tue, 2006-06-06 at 00:31 +0200, 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.
>>    
>>
>
>Another reason for creating a partition (perhaps a silly one, but I have
>found it useful) is that discs from different vendors (or even the same
>vendor) that are supposedly the same size often vary slightly, so I find
>it useful to create a partition slightly smaller than the total size of
>the disc. This is a little wasteful of space, but means that if I need
>to drop in a replacement disc that is slightly smaller than the original
>one, I can just copy an image of the old disc and it will generally
>work--otherwise I would have to fiddle around with whatever was near the
>end of the old disc.
>
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@redhat.com
>https://www.redhat.com/mailman/listinfo/linux-lvm
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>  
>
At least one partition of ~100 Mb is necessary as boot partition (grub 
cannot boot from an LVM and LILO is questionable). If you don't have to 
boot from the disk it's a question of taste. If I have a disk and fdisk 
tells me nothing is on it I try pvdisplay.
Joep

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

* Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
  2006-06-05 22:43   ` Mario Becroft (mailing list)
  2006-06-05 22:58     ` Joep Blom
@ 2006-06-09  8:31     ` Zac Slade
  1 sibling, 0 replies; 7+ messages in thread
From: Zac Slade @ 2006-06-09  8:31 UTC (permalink / raw)
  To: LVM general discussion and development

On Monday 05 June 2006 17:43, Mario Becroft (mailing list) wrote:
> On Tue, 2006-06-06 at 00:31 +0200, 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)?
I prefer full disks where possible.  Unless you have to boot from it there is 
no need for a partition table.

> Another reason for creating a partition (perhaps a silly one, but I have
> found it useful) is that discs from different vendors (or even the same
> vendor) that are supposedly the same size often vary slightly, so I find
> it useful to create a partition slightly smaller than the total size of
> the disc. This is a little wasteful of space, but means that if I need
> to drop in a replacement disc that is slightly smaller than the original
> one, I can just copy an image of the old disc and it will generally
> work--otherwise I would have to fiddle around with whatever was near the
> end of the old disc.
Yeah it is a little silly.  If the disk is good enough to image it's probably 
good enough to pvmove off of.  If that's the case take the new disk pvcreate 
it, add it to the volume group and pvmove /dev/old /dev/new once that 
completes just vgremove the old one.  Works like a champ.  If you run into 
problems wholesale pvmoving you can go to pvmove by extent.  Like I said 
above, unless you have to boot from the disk there is no need for partition 
tables.

-- 
Zac Slade
krakrjak@volumehost.net
ICQ:1415282 YM:krakrjak AIM:ttyp99

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

* Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
  2006-06-05 22:31 ` Heinz Mauelshagen
  2006-06-05 22:43   ` Mario Becroft (mailing list)
@ 2006-06-09 11:36   ` Dieter Stüken
  2006-06-09 18:44     ` Luca Berra
  1 sibling, 1 reply; 7+ messages in thread
From: Dieter Stüken @ 2006-06-09 11:36 UTC (permalink / raw)
  To: mauelshagen, LVM general discussion and development

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.

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

* Re: [linux-lvm] Is it better to use partitions or entire disk for LVM?
  2006-06-09 11:36   ` Dieter Stüken
@ 2006-06-09 18:44     ` Luca Berra
  0 siblings, 0 replies; 7+ messages in thread
From: Luca Berra @ 2006-06-09 18:44 UTC (permalink / raw)
  To: linux-lvm

On Fri, Jun 09, 2006 at 01:36:07PM +0200, Dieter St�ken wrote:
>does this make any sense?

A lot.

-- 
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

end of thread, other threads:[~2006-06-09 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2006-06-09 18:44     ` Luca Berra

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).