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


Groups > linux.debian.user > #195589 > unrolled thread

LVM setup with snapshots

Started byForest Dean Feighner <forest.feighner@gmail.com>
First post2018-05-11 01:30 +0200
Last post2018-05-12 13:40 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  LVM setup with snapshots Forest Dean Feighner <forest.feighner@gmail.com> - 2018-05-11 01:30 +0200
    Re: LVM setup with snapshots Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-05-11 09:30 +0200
      Re: LVM setup with snapshots Greg Wooledge <wooledg@eeg.ccf.org> - 2018-05-11 14:20 +0200
        Re: LVM setup with snapshots Forest Dean Feighner <forest.feighner@gmail.com> - 2018-05-11 21:00 +0200
          Re: LVM setup with snapshots Forest Dean Feighner <forest.feighner@gmail.com> - 2018-05-12 03:00 +0200
            Re: LVM setup with snapshots Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2018-05-12 13:40 +0200

#195589 — LVM setup with snapshots

FromForest Dean Feighner <forest.feighner@gmail.com>
Date2018-05-11 01:30 +0200
SubjectLVM setup with snapshots
Message-ID<vO3ax-71A-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I'm completely new to lvm.

lvs
LV     VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log
Cpy%Sync Convert
root   build-vg -wi-ao---- 463.52g
swap_1 build-vg -wi-ao----   2.00g


I used the default stretch of an lvm partition with the gnome.


To me, it seems me the partition is too large to to reduce for snapshots.

I'm prolly not 'getting' lvm yet.

What would be a good layout for a stretch install doing lvm snapshots?

Thanks
Forest

"I've bin kinda lazy lately'

[toc] | [next] | [standalone]


#195594

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2018-05-11 09:30 +0200
Message-ID<vOaF3-44X-1@gated-at.bofh.it>
In reply to#195589
Le 11/05/2018 à 01:21, Forest Dean Feighner a écrit :
> I'm completely new to lvm.

Then you really should read more about LVM and experiment it before 
installing a system on LVM.

> lvs
> LV     VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log
> Cpy%Sync Convert
> root   build-vg -wi-ao---- 463.52g
> swap_1 build-vg -wi-ao----   2.00g
> 
> I used the default stretch of an lvm partition with the gnome.
> 
> To me, it seems me the partition is too large to to reduce for snapshots.

What do you mean ?
Did you allocate all the available space in the volume group to the 
logical volumes ? Creating snapshots requires space.

> What would be a good layout for a stretch install doing lvm snapshots?

When installing with LVM, an important rule is to always leave plenty of 
free space in the volume group. Don't worry, extending a logical volume 
when needed is easy. This implies to use manual partitioning, because 
guided partitioning allocates all the available space.

[toc] | [prev] | [next] | [standalone]


#195599

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2018-05-11 14:20 +0200
Message-ID<vOfbH-7md-7@gated-at.bofh.it>
In reply to#195594
On Fri, May 11, 2018 at 09:20:32AM +0200, Pascal Hambourg wrote:
> > To me, it seems me the partition is too large to to reduce for snapshots.
> 
> What do you mean ?
> Did you allocate all the available space in the volume group to the logical
> volumes ? Creating snapshots requires space.

Yeah, if you let the installer do LVM partitioning "for" you, it
notoriously uses up all the extents, leaving you nothing to work with,
totally defeating the purpose of LVM.

If you do an LVM install with Debian, you have to do manual partitioning.
Or at least, you really *really* want to.

[toc] | [prev] | [next] | [standalone]


#195630

FromForest Dean Feighner <forest.feighner@gmail.com>
Date2018-05-11 21:00 +0200
Message-ID<vOlqO-2Ho-3@gated-at.bofh.it>
In reply to#195599

[Multipart message — attachments visible in raw view] — view raw

On Fri, May 11, 2018 at 8:15 AM, Greg Wooledge <wooledg@eeg.ccf.org> wrote:

> On Fri, May 11, 2018 at 09:20:32AM +0200, Pascal Hambourg wrote:
> > > To me, it seems me the partition is too large to to reduce for
> snapshots.
> >
> > What do you mean ?
> > Did you allocate all the available space in the volume group to the
> logical
> > volumes ? Creating snapshots requires space.
>
> Yeah, if you let the installer do LVM partitioning "for" you, it
> notoriously uses up all the extents, leaving you nothing to work with,
> totally defeating the purpose of LVM.
>
> If you do an LVM install with Debian, you have to do manual partitioning.
> Or at least, you really *really* want to.
>
>

Yes, this was my first lvm install using the defaults which did not leave
enough room for snapshots.

[toc] | [prev] | [next] | [standalone]


#195643

FromForest Dean Feighner <forest.feighner@gmail.com>
Date2018-05-12 03:00 +0200
Message-ID<vOr3b-60A-1@gated-at.bofh.it>
In reply to#195630

[Multipart message — attachments visible in raw view] — view raw

I really didn't prepare for lvm. I never used lvm before this so had no
idea of lvm before.

Snapshots sound like an awesome idea.

I would like to do a configured base install, create a snapshot, and modify
(fork), the base for different things.

With 20/20 hindsight. The default doesn't seem to have room. What are
different solutions other debian/lvm users have used?

Thanks
Forest





On Fri, May 11, 2018 at 2:57 PM, Forest Dean Feighner <
forest.feighner@gmail.com> wrote:

>
>
> On Fri, May 11, 2018 at 8:15 AM, Greg Wooledge <wooledg@eeg.ccf.org>
> wrote:
>
>> On Fri, May 11, 2018 at 09:20:32AM +0200, Pascal Hambourg wrote:
>> > > To me, it seems me the partition is too large to to reduce for
>> snapshots.
>> >
>> > What do you mean ?
>> > Did you allocate all the available space in the volume group to the
>> logical
>> > volumes ? Creating snapshots requires space.
>>
>> Yeah, if you let the installer do LVM partitioning "for" you, it
>> notoriously uses up all the extents, leaving you nothing to work with,
>> totally defeating the purpose of LVM.
>>
>> If you do an LVM install with Debian, you have to do manual partitioning.
>> Or at least, you really *really* want to.
>>
>>
>
> Yes, this was my first lvm install using the defaults which did not leave
> enough room for snapshots.
>
>
>
>
>

[toc] | [prev] | [next] | [standalone]


#195647

FromEduardo M KALINOWSKI <eduardo@kalinowski.com.br>
Date2018-05-12 13:40 +0200
Message-ID<vOB2x-4MI-1@gated-at.bofh.it>
In reply to#195643
On 11-05-2018 21:46, Forest Dean Feighner wrote:
> I really didn't prepare for lvm. I never used lvm before this so had
> no idea of lvm before.
>
> Snapshots sound like an awesome idea.
>
> I would like to do a configured base install, create a snapshot, and
> modify (fork), the base for different things.
>
> With 20/20 hindsight. The default doesn't seem to have room. What are
> different solutions other debian/lvm users have used?

You can shrink most kinds of partitions (including ext4), and then
shrink the logical volumes (in this order). It's not as convenient as
growing the LVs since the partitions must not be mounted and shrinking
can be somewhat slow if data needs to be shuffled around, but it's possible.

As always, there's a small risk of data loss, so better have a backup of
important data.

-- 

She is descended from a long line that her mother listened to.
		-- Gypsy Rose Lee

Eduardo M KALINOWSKI
eduardo@kalinowski.com.br

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web