how to use lvreduce command and its examples

  • About lvreduce: To reduce the size of a logical volume
  • It comes from “lvm2-2.02.72” package.
  • Configuration Files:
  • Path: /sbin/lvreduce

Examples:

1. To reduce the logical volume

$ lvreduce -l [-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}]

2. To disable udev synchronization

$ lvreduce –noudevsync

3. To reduce or set the logical volume size in units of logical extents.

$ lvreduce -l [-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}]
$ lvreduce –extents [-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}] 

4. To reduce  or  set the logical volume size in units of megabytes

$ lvreduce -L [-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]
$ lvreduce –size [-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]

5. To do not perform fsck before resizing filesystem when filesystem requires it

$ lvreduce -n
$ lvreduce –nofsck 

6. To resize underlying filesystem together with the logical volume using fsadm

$ lvreduce -r 
$ lvreduce –resizefs 

Related Commands: fsadm, lvchange, lvconvert, lvcreate, lvextend, lvm, lvresize, vgreduce 

Leave a Reply

Your email address will not be published. Required fields are marked *