Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] LVM for data drives but not the OS
Date: Sat, 09 Apr 2011 11:45:40
Message-Id: 4DA0465D.2000409@gmail.com
In Reply to: Re: [gentoo-user] LVM for data drives but not the OS by Alan McKinnon
1 Alan McKinnon wrote:
2 > Apparently, though unproven, at 12:48 on Saturday 09 April 2011, Dale did
3 > opine thusly:
4 > Yes.
5 >
6 > PVs, VGs, LVs all have a concept of extend|resize|reduce. What that means
7 > depends on what you are working with, but they all make the thing bigger or
8 > smaller.
9 >
10 > For a PV it means the underlying device's size changed, so the PV must change
11 > to match. Take a 500G drive, create 1 partition on it of 100G and make it a
12 > PV. Now enlarge the partition to 200G, you must extend the PV to match.
13 >
14 > A VG isn't a single thing, it's a collection of things. Extending it means to
15 > add more PVs, reducing it means to take PVs out of the VG. Hopefully you will
16 > always remember to migrate the data off a PV before removing it from a VG :-)
17 >
18 > Extend/Reduce an LV means to make the device larger/smaller. It is exactly the
19 > same thing as changing a partition size using fdisk. Obviously, you need to
20 > tweak the filesystem at the same time
21 >
22 >
23
24
25 So, when I get me a new drive, I use pvcreate to get it ready for LVM,
26 then use vgextend to add it to the VG, then it is available for whatever
27 LV I want to extend or to make a new LV?
28
29 I think I am catching on here. It was just difficult for me to grasp
30 how things are layered for some reason. Some of the pictures I found
31 helped a good bit tho. Just helped me picture what the commands are
32 doing exactly.
33
34 I did learn the hard way to resize the file system tho. I forgot that
35 earlier. Sort of had me scratching my head for a bit. lol
36
37 Dale
38
39 :-) :-)

Replies

Subject Author
Re: [gentoo-user] LVM for data drives but not the OS Joost Roeleveld <joost@××××××××.org>
Re: [gentoo-user] LVM for data drives but not the OS Alan McKinnon <alan.mckinnon@×××××.com>