Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.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:21:02
Message-Id: 201104091319.10422.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] LVM for data drives but not the OS by Dale
1 Apparently, though unproven, at 12:48 on Saturday 09 April 2011, Dale did
2 opine thusly:
3
4 > > the new drive ready for LVM. What command adds it to the VG? Is it
5 > > vgcreate with some option? I was sort of looking for something like
6 > > vgadd or something but no luck finding that. Maybe I am missing it on
7 > > the howtos.
8 > >
9 > > Dale
10 > >
11 > > :-) :-)
12 >
13 > That would be vgextend wouldn't it? I just read another bit in another
14 > howto.
15
16 Yes.
17
18 PVs, VGs, LVs all have a concept of extend|resize|reduce. What that means
19 depends on what you are working with, but they all make the thing bigger or
20 smaller.
21
22 For a PV it means the underlying device's size changed, so the PV must change
23 to match. Take a 500G drive, create 1 partition on it of 100G and make it a
24 PV. Now enlarge the partition to 200G, you must extend the PV to match.
25
26 A VG isn't a single thing, it's a collection of things. Extending it means to
27 add more PVs, reducing it means to take PVs out of the VG. Hopefully you will
28 always remember to migrate the data off a PV before removing it from a VG :-)
29
30 Extend/Reduce an LV means to make the device larger/smaller. It is exactly the
31 same thing as changing a partition size using fdisk. Obviously, you need to
32 tweak the filesystem at the same time
33
34 --
35 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] LVM for data drives but not the OS Dale <rdalek1967@×××××.com>