a doubt on shrinking logical volume
hi,
i am running zod and my partitions are based on lvm. i read from resize2fs man page as If you wish to shrink an ext2 partition, first use resize2fs to shrink the size of filesystem. Then you may use fdisk(8) to shrink the size of the partition. When shrinking the size of the partition, make sure you do not make it smaller than the new size of the ext2 filesystem! now my question is when we resize a partition , the resized no is appropriate.example if i resize a partition to extend or shrink to 500mb , it may be resized between the ranges of 470mb-530mb ,i think. to shrink a partition they ask me to reduce the ext2 filesytem size first and then the partition second.So how can i predict the exact value of the resized partition , so that i shall reduce the filesystem value first. is there any methods directly? or i have to make the the file system to lower size and extend it for the remaining? thanks for any response regards, Nirmal Tom. |
Maybe you are mixing LV and partition here.
If I understand correctly, you want to shrink the file system, and then the logical volume. Do you also want to shrink the underlying harddisk partition, or not? |
hi,
i dont want to shrink the the underluing physical partition.i want to shrink the logical volume ,say, from 800mb to 500mb thanks and regards, Nirmal Tom. |
What are the PE (physical extend) size of your VG and your PV (see vgdisplay and pvdisplay)?
|
hi,
from vgdisplay, PE Size 32.00 MB from pvdisplay, PE Size (KByte) 32768 thanks, Nirmal Tom. |
Right, so if make your new filesystem size a multiple of 32MB, then lvreduce will not adapt that size because it is an multiple of the PE size.
Still, I strongly advise you to take a backup first. |
hi,
thanks fpor the infn regards, Tom |
All times are GMT -5. The time now is 03:58 PM. |