LVM resize sanity check
Gilboa Davara
gilboad at gmail.com
Thu Oct 23 13:52:11 UTC 2008
On Wed, 2008-10-22 at 11:42 -0400, brian wrote:
> # umount /var
> # e2fsck -f /dev/VolGroup00/LogVol04
> # resize2fs /dev/VolGroup00/LogVol04 13G
> # lvreduce -L-6G /dev/VolGroup00/LogVol04
> # mount /var
> # umount /tmp
> # e2fsck -f /dev/VolGroup00/LogVol03
> # lvextend -L+6G /dev/VolGroup00/LogVol03
> # resize2fs /dev/VolGroup00/LogVol03
> # mount /tmp
>
> Does that ring any alarm bells?
One huge alarm bell.
When you are manually resizing an ext3/LVM combo you risk over reducing
the LVM compared to the ext3 FS due to math/1000vs1024 conversion
errors.
As, such, I over reduce the file-system, resize the LVM and than extend
the file-system back to the intended size.
E.g. Reduce Home to 14GB:
$ e2fsck -f /dev/VolMD/LogHome
$ resize2fs /dev/VolMD/LogHome 13G
$ lvreduce -L14G /dev/VolMD/LogHome
$ resize2fs /dev/VolMD/LogHome
$ e2fsck -f /dev/VolMD/LogHome
$ echo Done.
- Gilboa
More information about the fedora-list
mailing list