Re: Resizing LVM issue
On 6/14/2014 4:33 PM, Miroslav Skoric wrote:
> ...may I suggest to LVM programmers to
> think about some software routines that would enable users to recompose
> (resize, shrink, whatever ...) their LVM from within a mounted system,
> in a way that after the next reboot, the LVM and FS automatically
> recomposes itself - so to avoid common mistakes.
This is not possible. A filesystem must be shrunk before the underlying
storage device. If you shrink the LV first then portions of the
filesystem will now map to non-existent sectors. If files exist in
those sectors they will be lost. Same goes for filesystem metadata.
It is possible to add sectors to a device under a mounted filesystem
because the filesystem has no knowledge of them, and is not mapping
them. The same is not true of removing sectors under a mounted
filesystem, for the reason above.
Cheers,
Stan
Reply to: