[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: LVM resize sanity check



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]