Re: Safe lvm reduce

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

 



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
...

Afterwards, do the lvm lvresize device -L $((new_size_in_fs_blocks*4))k

-- 
lfr
0/0

Attachment: pgpo1OO4wHxY4.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux