Hi !
Thank you for the fast reply..
Luciano Rocha wrote:
On Tue, Oct 16, 2007 at 02:34:39PM +0200, Demeter Tibor wrote:
Dear Listmembers !
How can i reduce my LVM logical volume from 1.6 TB to 1.3 TB safely ? I
using ext3 filesystem on this volume and i never should yet this.
I know my friend is the lvreduce, but how can i reduce the ext3 filesystem
without datalossing.
You need to first reduce the filesystem size with the command resize2fs.
Make sure the filesystem is unmounted (use a rescue cd, if necessary,
but be advised that lvm commads be then prefixed with "lvm "), force
fsck on it (e2fsck -f device), then run resize2fs new_size_in_fs_blocks.
The value of fs_blocks is usually 4096, but depends on the filesystem.
You can find the correct value with dumpe2fs device | grep size:
...
Block size: 4096
...
If i using resize2fs newsize_in_fs_GB or MBinstead of blocksize then is
problem?
I don't understand what is the different.
Afterwards, do the lvm lvresize device -L $((new_size_in_fs_blocks*4))k
Regards:
DT