The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

9.10. Reducing a logical volume

Logical volumes can be reduced in size as well as increased. However, it is very important to remember to reduce the size of the file system or whatever is residing in the volume before shrinking the volume itself, otherwise you risk losing data.

  1. ext2

    If you are using ext2 as the file system then you can use the e2fsadm command mentioned earlier to take care of both the file system and volume resizing as follows:
# umount /home
    # e2fsadm -L-1G /dev/myvg/homevol
    # mount /home

    If you prefer to do this manually you must know the new size of the volume in blocks and use the following commands:
# umount /home
    # resize2fs /dev/myvg/homevol 524288
    # lvreduce -L-1G /dev/myvg/homevol
    # mount /home

  2. reiserfs

    Reiserfs seems to prefer to be unmounted when shrinking
# umount /home
    # resize_reiserfs -s-1G /dev/myvg/homevol
    # lvreduce -L-1G /dev/myvg/homevol
    # mount -treiserfs /dev/myvg/homevol /home

  3. xfs

    There is no way to shrink XFS file systems.

Inferno Solutions
Hosting by

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру