Dale asks:

> OK.  Everyone duck, I been thinking on this and Neils info above.  lol  
> This is what I sort of figured out and tell me where I am off here.  I 
> have to reduce the file system, change the partition in cfdisk (?), 
> resize the lv, then reduce the vg, then I can run pvmove?  After all 
> that, I can remove the drive sdb?  Do I have the order correct too?  If 
> it does involve all this, I'm not sure I want to do this.  The file 
> system and cfdisk part makes me nervous.  Maybe some of this isn't 
> needed and I am reading some of the info incorrectly, I hope.

No need for cfdisk. Just shrink the file system, and then the logical
volume. You can keep the VG as it is, as you move stuff around inside
the same VG. BTW, I also tend to make lots of partitions on a drive, all
belonging to the same VG, so I can more easily change things later. Like
freeing a partition in case some other OS needs space for itself or
something like that.
I tend to shrink the file system to a size somewhat smaller than the
logical volume, just in case there is some additional header or
something, or different utilities use different units (megabytes vs.
mibibytes). Calling resize2fs afterwards enlarges the FS to the maximum
size.

I wrote a script to automate this, it also takes care of a LUKS volume
on the LVM. And is easier to use than doing all those steps in a row.
And I trust it more than me making a typo in one of those commands. But
I don't think I would use such a thing written by some guy, and prefer
to just do it myself.

        Wonko

Reply via email to