1 |
I do have 3 2tb drives with lvm2 on them recently I did resize some partitions (i didn't resize the vg - one drive one vg here) but I use lvresize -L ±nnG vg/lv to add exactly nn GB to desired lv an than online grow with resize2fs /dev/vg/lv |
2 |
|
3 |
I did this more than once and never encountered any problem. |
4 |
S |
5 |
|
6 |
walt <w41ter@×××××.com> wrote: |
7 |
|
8 |
>I've never expanded an lvm partition before, and I think I did it the |
9 |
>long way around just now: |
10 |
> |
11 |
>I divided my 1TB disk into 10 equal pv's when I bought it, and then |
12 |
>added four of those to a new vg (named wd0), leaving the other six |
13 |
>for future use. |
14 |
> |
15 |
>After a few months of filling up that partition I needed more room, |
16 |
>of course, so I used vgextend to add a fifth pv to the existing vg. |
17 |
>That worked fine, but now I had to extend the ext4 fs to fill all of |
18 |
>the added new space. |
19 |
> |
20 |
>While googling I saw some advice to use resize2fs for that, but |
21 |
>resize2fs said there is nothing to do on that fs and quit without |
22 |
>doing anything. |
23 |
> |
24 |
>After some fumbling around I used lvextend -r -L nnnnn /dev/wd0/wd0, |
25 |
>where nnnnn is the number of unused extents listed by pvdisplay. |
26 |
> |
27 |
>That (eventually) worked but each time I ran that command, only |
28 |
>roughly half of the empty extents were added instead of the whole |
29 |
>nnnnn of them. Took me about 10 iterations before all of the |
30 |
>extents were finally added to the filesystem :-/ |
31 |
> |
32 |
>So, did I use the wrong tools or in the wrong order, or what? |
33 |
>It should have been easier than that, I think. |
34 |
|
35 |
-- |
36 |
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |