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