lvm -> shrinking logical volumes
Paul Howarth
paul at city-fan.org
Mon Jun 6 18:50:46 UTC 2005
On Mon, 2005-06-06 at 20:45 +0200, Boris Glawe wrote:
> Hi,
>
> According to the lvm documentation, it is possible to shrink a logical
> volume with lvresize or lvreduce.
>
> The man pages warn about lost data, when the removed parts are being
> used by the filesystem.
>
> How do I reduce a lvm's size then? How do I find out, whether I can
> reduce the size. How can I ensure, that the filesystem is consistent
> after the reduction?
First reduce the size of the filesystem on the logical volume. For
ext2/ext3 filesystems, you can use resize2fs for this. I usually make
the filesystem size smaller than the size I eventually want it to be (to
allow a safety margin), then run resize2fs again (or ext2online) after
shrinking the logical volume to get the filesystem using the full size
of the volume.
Paul.
--
Paul Howarth <paul at city-fan.org>
More information about the users
mailing list