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


Groups > linux.debian.user > #174089

Re: new pc and swap

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups linux.debian.user
Subject Re: new pc and swap
Date 2016-10-31 19:50 +0100
Message-ID <sypOG-694-15@gated-at.bofh.it> (permalink)
References (2 earlier) <sxZ7P-5Ll-1@gated-at.bofh.it> <syh4K-ri-13@gated-at.bofh.it> <syh4K-ri-11@gated-at.bofh.it> <syli2-36G-5@gated-at.bofh.it> <sypvk-62L-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 31, 2016 at 01:27:22PM -0500, Richard Owlett wrote:
> To paraphrase Julius Caesar:
> omnia disci en tres partes est:
>   primary
>   extended
>   logical
> 
> Whither goest LVM?

LVM is a more flexible alternative to using a set of fixed-sized
partitions.

Under LVM, you create two (or more, but usually two) *real* partitions:
say, sda1 and sda1.  The first partition (sda1) is just formatted using
a straight file system, used for /boot.  The other partition (sda2)
is not given a file system; instead, it is turned into a Volume Group
(VG), which is sort of like a virtual disk.

Within the VG you have a whole bunch of "slices" or "physical extents"
(PE), each one being some fixed size like 4 MB or 16 MB.  The whole VG
therefore contains however many thousand PE make up the physical space.

When you want to actually use the disk, you create a "logical volume" (LV)
out of however many PEs you need.  If you're creating a 1 GB file system
for a disk with 4 MB PEs, then your new LV would consist of 256 PEs.
These don't have to be contiguous.  Once the LV is created, it is usable
just like a partition.  You can format it with a file system, and mount
it, and put files on it.  Or format it for swap, or whatever.

Typically you perform your LVM installation by setting up the file systems
and swap partitions (created on LVs) using minimum sizes, and leave most
of the VG unused.

Later, if you realize you need to increase the size of /usr by 8 GB,
you just increase the size of its LV (assigning some more PEs to it,
even if they're not contiguous to the original set), and then increase
the size of the file system to match.  With most unix-like file systems,
this doesn't require any down time (unmounting) at all.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

new pc and swap Pol Hallen <deben@fuckaround.org> - 2016-10-30 13:00 +0100
  Re: new pc and swap Michael Milliman <michael.e.milliman@gmail.com> - 2016-10-30 14:20 +0100
  Re: new pc and swap Markus Grunwald <markus@the-grue.de> - 2016-10-30 15:00 +0100
    Re: new pc and swap Richard Owlett <rowlett@cloud85.net> - 2016-10-30 15:20 +0100
      Re: new pc and swap Pascal Hambourg <pascal@plouf.fr.eu.org> - 2016-10-30 16:50 +0100
        Re: new pc and swap Markus Grunwald <markus@the-grue.de> - 2016-10-30 19:30 +0100
      Re: new pc and swap Richard Owlett <rowlett@cloud85.net> - 2016-10-31 10:30 +0100
        Re: new pc and swap Stefan Monnier <monnier@iro.umontreal.ca> - 2016-10-31 15:00 +0100
          Re: new pc and swap Richard Owlett <rowlett@cloud85.net> - 2016-10-31 19:30 +0100
            Re: new pc and swap Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-31 19:50 +0100
              Re: new pc and swap Pascal Hambourg <pascal@plouf.fr.eu.org> - 2016-10-31 20:20 +0100
            Re: new pc and swap <tomas@tuxteam.de> - 2016-10-31 21:00 +0100
            Re: new pc and swap "John L. Ries" <jries@salford-systems.com> - 2016-10-31 22:40 +0100
          Re: new pc and swap Pascal Hambourg <pascal@plouf.fr.eu.org> - 2016-10-31 20:00 +0100
            Re: new pc and swap Mark Fletcher <mark27q1@gmail.com> - 2016-11-01 00:10 +0100
              Re: new pc and swap Johann Spies <johann.spies@gmail.com> - 2016-11-01 07:10 +0100
                Re: new pc and swap Richard Hector <richard@walnut.gen.nz> - 2016-11-01 09:30 +0100
                Re: new pc and swap Pascal Hambourg <pascal@plouf.fr.eu.org> - 2016-11-01 11:00 +0100
                Re: new pc and swap Richard Hector <richard@walnut.gen.nz> - 2016-11-02 01:50 +0100
                Re: new pc and swap Stefan Monnier <monnier@iro.umontreal.ca> - 2016-11-01 14:10 +0100
                Re: new pc and swap Pascal Hambourg <pascal@plouf.fr.eu.org> - 2016-11-01 15:00 +0100
                Re: new pc and swap Ben Caradoc-Davies <ben@transient.nz> - 2016-11-01 20:00 +0100
          Re: new pc and swap Mark Fletcher <mark27q1@gmail.com> - 2016-11-01 00:00 +0100
  Re: new pc and swap Ben Caradoc-Davies <ben@transient.nz> - 2016-10-30 17:50 +0100
    Re: new pc and swap Pascal Hambourg <pascal@plouf.fr.eu.org> - 2016-10-30 18:20 +0100
  Re: new pc and swap David Christensen <dpchrist@holgerdanske.com> - 2016-10-30 19:50 +0100

csiph-web