To reduce the size of a logical volume, use the lvreduce command.
If the logical volume contains a file system, be sure to umount it and reduce the file system first.
Umount the file system
# umount /file_system_name
Check if all data structures of you logical volume are cleaned.
# fsck -f /dev/vgname/lvname
Resize the file system
# resize -p /dev/vgname/lvname 500M
Reduce the logical volume
# lvreduce -L 500M /dev/vgname/lvname
If the logical volume contains a file system, be sure to umount it and reduce the file system first.
Umount the file system
# umount /file_system_name
Check if all data structures of you logical volume are cleaned.
# fsck -f /dev/vgname/lvname
Resize the file system
# resize -p /dev/vgname/lvname 500M
Reduce the logical volume
# lvreduce -L 500M /dev/vgname/lvname
Checking
df -h /file_system_name
df -h /file_system_name
Comments
Post a Comment