LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   how to reduce logical volume (https://www.linuxquestions.org/questions/linux-enterprise-47/how-to-reduce-logical-volume-375680/)

LinuxLover 10-22-2005 04:10 AM

how to reduce logical volume
 
hello every body....

I created lvm on RHEL 4 AS.

in RHEL4 I can increase lvm by commands

#lvextend +L 50M /dev/test0/data
#ext2online /dev/test0/data

this will increase my lvm 50 mega bytes as well as icrease the actual file system.



Now my question is that how can I decrese lv size.

the command
#lvreduce -L 30M /dev/test0/data

reduces the size of lmv but actual file system shows the same size by
#df -h

command.


waiting for

mhiggins 10-28-2005 05:01 PM

From the man page this is not possible with a mounted file system.

The ext2online tool resizes ext2 file systems while they are mounted and in use by the system. It is OK to resize the filesystem even while
programs have open files and are writing into the filesystem. It is _only_ possible to _enlarge_ a mounted filesystem. It is possible to use
ext2resize(8) to _shrink_ and enlarge an _unmounted_ filesystem.

bloretech 10-29-2005 08:26 AM

Do not try reducing the partition when it is mounted. You will end up losing all the data in that partition. You can increase the partition size online but reducing online is not recommended.

First, unmount the partition and repeat the same steps. That will work. Also, while reducing, you need to resize the partition as well.


All times are GMT -5. The time now is 06:04 AM.