1 |
I've never expanded an lvm partition before, and I think I did it the |
2 |
long way around just now: |
3 |
|
4 |
I divided my 1TB disk into 10 equal pv's when I bought it, and then |
5 |
added four of those to a new vg (named wd0), leaving the other six |
6 |
for future use. |
7 |
|
8 |
After a few months of filling up that partition I needed more room, |
9 |
of course, so I used vgextend to add a fifth pv to the existing vg. |
10 |
That worked fine, but now I had to extend the ext4 fs to fill all of |
11 |
the added new space. |
12 |
|
13 |
While googling I saw some advice to use resize2fs for that, but |
14 |
resize2fs said there is nothing to do on that fs and quit without |
15 |
doing anything. |
16 |
|
17 |
After some fumbling around I used lvextend -r -L nnnnn /dev/wd0/wd0, |
18 |
where nnnnn is the number of unused extents listed by pvdisplay. |
19 |
|
20 |
That (eventually) worked but each time I ran that command, only |
21 |
roughly half of the empty extents were added instead of the whole |
22 |
nnnnn of them. Took me about 10 iterations before all of the |
23 |
extents were finally added to the filesystem :-/ |
24 |
|
25 |
So, did I use the wrong tools or in the wrong order, or what? |
26 |
It should have been easier than that, I think. |