1 |
Dale asks: |
2 |
|
3 |
> OK. Everyone duck, I been thinking on this and Neils info above. lol |
4 |
> This is what I sort of figured out and tell me where I am off here. I |
5 |
> have to reduce the file system, change the partition in cfdisk (?), |
6 |
> resize the lv, then reduce the vg, then I can run pvmove? After all |
7 |
> that, I can remove the drive sdb? Do I have the order correct too? If |
8 |
> it does involve all this, I'm not sure I want to do this. The file |
9 |
> system and cfdisk part makes me nervous. Maybe some of this isn't |
10 |
> needed and I am reading some of the info incorrectly, I hope. |
11 |
|
12 |
No need for cfdisk. Just shrink the file system, and then the logical |
13 |
volume. You can keep the VG as it is, as you move stuff around inside |
14 |
the same VG. BTW, I also tend to make lots of partitions on a drive, all |
15 |
belonging to the same VG, so I can more easily change things later. Like |
16 |
freeing a partition in case some other OS needs space for itself or |
17 |
something like that. |
18 |
I tend to shrink the file system to a size somewhat smaller than the |
19 |
logical volume, just in case there is some additional header or |
20 |
something, or different utilities use different units (megabytes vs. |
21 |
mibibytes). Calling resize2fs afterwards enlarges the FS to the maximum |
22 |
size. |
23 |
|
24 |
I wrote a script to automate this, it also takes care of a LUKS volume |
25 |
on the LVM. And is easier to use than doing all those steps in a row. |
26 |
And I trust it more than me making a typo in one of those commands. But |
27 |
I don't think I would use such a thing written by some guy, and prefer |
28 |
to just do it myself. |
29 |
|
30 |
Wonko |