Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.hardware > #3140

Re: maximum number of partitions

From Aragorn <thorongil@telenet.be.invalid>
Newsgroups comp.os.linux.hardware
Subject Re: maximum number of partitions
Followup-To comp.os.linux.hardware
Date 2016-06-05 16:18 +0200
Organization A noiseless patient Strider
Message-ID <nj1ccf$96q$1@dont-email.me> (permalink)
References (10 earlier) <nibui5$eis$2@dont-email.me> <niu17u$b8c$2@saria.nerim.net> <nj0tqi$6tc$1@dont-email.me> <nj1626$43l$1@dont-email.me> <nj1at0$i32$1@dont-email.me>

Followups directed to: comp.os.linux.hardware

Show all headers | View raw


On Sunday 05 Jun 2016 15:53, Henrik Carlqvist conveyed the following to 
comp.os.linux.hardware...

> On Sun, 05 Jun 2016 14:31:02 +0200, Aragorn wrote:
> 
>> On Sunday 05 Jun 2016 12:10, Henrik Carlqvist conveyed the following
>> to comp.os.linux.hardware...
>>> But are you with LVM really able to have multiple logical volumes if
>>> you only have one single partition?
> 
>> Yes, of course.  That's the whole idea.
>> 
>>> I thought that you would need at least one partition for every
>>> logical volume and that you would need one logical volume for each
>>> file system?
>> 
>> No...  The first step is to create a physical volume with
>> /sbin/pvcreate.  This can span an entire hard disk, so that the hard
>> disk doesn't even need to have a partition table (although it can),
>> or you can choose a real partition as the physical volume.  Using an
>> entire hard disk as the physical volume without that there is a
>> partition table is of course not recommended for system disks.
>> 
>> Then, within the physical volume, you create logical volumes with
>> /sbin/lvcreate.  Logical volumes can be contiguous or discontiguous.
>> Then, you create a filesystem on each created logical volume
> 
>> If you're interested in the subject, then I recommend perusing those
>> man pages, because they will already be on your system anyway, so you
>> won't have to install them separately. ;)
> 
> Looking at the man-page of lvcreate on my Slackware 13.1 system it
> says:
> 
> -8<---------------------------------------------
> lvcreate  creates  a  new logical volume in a volume group ( see
> vgcre- ate(8), vgchange(8) ) by allocating logical extents from the
> free phys-
> ical  extent  pool  of that volume group.
> -8<---------------------------------------------

Yep, I forgot to mention vgcreate.  You can have multiple volume groups, 
each of them containing multiple logical volumes.  For a simple home-
based desktop system, having only one volume group would normally cut 
it, but for servers, having multiple volume groups for administrative 
purposes could be very interesting.

> It is not clear by the man page what those "physical extents" are, but
> the the first image on
> https://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29
> explaining "Various elements ofthe LVM" seems to indicate that a
> Volume Group might consist of any number of Physical Volumes and that
> each Physical Volume has a number of Physical Partitions. Then those
> partitions seemt to be used for Logical Volumes. The text next to that
> image also says that "Logical Volumes can be resized online by
> concatenating extents onto them." From the image it seems as if each
> extent is a Physical Partition.
> 
> The man-page of lvcreate also has an example:
> -8<---------------------------
> "lvcreate -L 64M -n lvol1 vg00 /dev/sda:0-7 /dev/sdb:0-7"
> creates  a  linear  logical  volume "vg00/lvol1" using physical
> extents /dev/sda:0-7 and /dev/sdb:0-7 for allocation of extents.
> -8<---------------------------
> 
> Those physical extents /dev/sda:0-7 and /dev/sdb:0-7 seem just like
> partitions to me.

Physical extents can be disk blocks, hard disks, hard disk partitions or 
even logical volumes, depending on the context.  

It's an abstraction layer above the physical partitioning layout.  A 
single logical volume could for instance span two complete hard disks 
plus a couple of partitions on yet a third hard disk.

A common scenario for a home-based desktop workstation with a single 
hard disk could for instance be to create a separate /boot partition and 
one big partition covering the rest of the system ─ you will need to 
boot such a system using an initramfs with LVM support, of course, but 
dracut can take care of that.  

Then, you preparate the big partition with pvcreate, and then you create 
a single volume group within that with vgcreate.  Next, you create 
logical volumes within that volume group while still leaving an amount 
of unallocated space on your hard disk, and you start creating 
filesystems on the logical volumes, starting with the root filesystem, 
and then creating directories to mount the individual filesystems on.

Now, if at some point later on you find that a particular filesystem is 
getting too small, then you can extend the logical volume with 
blocks/extents from the unallocated part of the physical partition, and 
then all you need to do is grow the filesystem so that it makes use of 
those added blocks/extents.

LVM also allows you to create snapshots, move the snapshots, concatenate 
logical volumes into a new volume, et al.

-- 
= Aragorn =

         http://www.linuxcounter.net - registrant #223157

Back to comp.os.linux.hardware | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

maximum number of partitions Haines Brown <haines@engels.histomat.net> - 2016-05-26 13:16 -0400
  Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-26 20:22 +0200
    Re: maximum number of partitions Haines Brown <haines@engels.histomat.net> - 2016-05-26 16:02 -0400
      Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-05-26 21:02 +0000
        Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-27 00:36 +0200
        Re: maximum number of partitions Haines Brown <haines@engels.histomat.net> - 2016-05-27 07:08 -0400
          Re: maximum number of partitions floyd@apaflo.com (Floyd L. Davidson) - 2016-05-27 04:03 -0800
            Re: maximum number of partitions Haines Brown <haines@engels.histomat.net> - 2016-05-27 09:25 -0400
              Re: maximum number of partitions floyd@apaflo.com (Floyd L. Davidson) - 2016-05-27 05:53 -0800
                Re: maximum number of partitions Haines Brown <haines@engels.histomat.net> - 2016-05-27 12:48 -0400
          Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-27 14:50 +0200
  Re: maximum number of partitions Vilmos Soti <vilmos@soti.ca> - 2016-05-26 12:40 -0700
  Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-26 22:29 +0200
    LVM [was: maximum number of partitions] Haines Brown <haines@engels.histomat.net> - 2016-05-27 07:44 -0400
      Re: LVM [was: maximum number of partitions] Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-27 18:07 +0200
  Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-05-26 22:27 +0100
    Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-05-27 06:05 +0000
      Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-05-27 08:36 +0100
        Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-27 12:17 +0200
        Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-05-27 18:49 +0000
          Re: maximum number of partitions Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2016-05-27 19:08 -0500
            Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-05-28 07:11 +0000
              Re: maximum number of partitions Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2016-05-28 09:22 -0500
      Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-05-27 10:07 +0200
      Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-27 18:07 +0200
        Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-27 20:30 +0200
          Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-28 00:05 +0200
            Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-28 04:45 +0200
              Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-28 07:26 +0200
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-05-28 07:15 +0000
                Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-28 10:25 +0200
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-05-28 11:14 +0000
                Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-28 13:52 +0200
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-05-28 18:46 +0200
                Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-28 19:57 +0200
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-05-28 20:15 +0200
                Re: maximum number of partitions Bobbie Sellers <bliss-sf4ever@dslextreme.com> - 2016-05-28 12:04 -0700
                Re: maximum number of partitions Marc Haber <mh+usenetspam1118@zugschl.us> - 2016-05-28 22:47 +0200
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-05-29 07:36 +0200
                Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-29 13:48 +0200
                Re: maximum number of partitions Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2016-06-04 09:50 +0200
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-05 10:10 +0000
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-06-05 14:31 +0200
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-05 13:53 +0000
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-06-05 16:18 +0200
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-05 18:53 +0000
                Re: maximum number of partitions Scott Hemphill <hemphill@hemphills.net> - 2016-06-05 17:58 -0400
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-06 14:09 +0000
                Re: maximum number of partitions Scott Hemphill <hemphill@hemphills.net> - 2016-06-06 10:32 -0400
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-06-06 16:48 +0200
                Re: maximum number of partitions Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2016-06-08 22:23 +0200
                Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-06-06 15:55 +0100
                Re: maximum number of partitions Aragorn <thorongil@telenet.be.invalid> - 2016-06-06 17:41 +0200
                Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-06-06 17:23 +0100
                Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-06-06 22:36 +0200
                Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-06-06 21:51 +0100
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-07 04:54 +0000
                Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-06-07 08:43 +0100
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-07 19:04 +0000
                Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-06-07 20:30 +0100
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-08 07:08 +0000
                Re: maximum number of partitions Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2016-06-06 15:50 +0000
                Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-06-05 16:03 +0200
                Re: maximum number of partitions noSpam@gmail.com - 2016-07-18 18:57 +0000
                Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-28 17:10 +0200
                Re: maximum number of partitions Richard Kettlewell <rjk@greenend.org.uk> - 2016-05-28 18:07 +0100
                Re: maximum number of partitions "Carlos E.R." <robin_listas@invalid.es> - 2016-05-28 21:33 +0200
  Re: maximum number of partitions novinhael@gmail.com - 2017-02-07 18:10 -0800
    Re: maximum number of partitions Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2017-02-08 07:58 -0600
    Re: maximum number of partitions faeychild <faeychild@nomail.afraid.org> - 2017-02-13 15:23 +1100
      Re: maximum number of partitions "Carlos E. R." <robin_listas@invalid.es> - 2017-02-13 08:04 +0100
    Re: maximum number of partitions "Carlos E. R." <robin_listas@invalid.es> - 2017-02-13 08:12 +0100

csiph-web