3
3
lvreduce \- reduce the size of a logical volume
6
[\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-f|\-\-force]
9
{\-l|\-\-extents [\-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}] |
10
\-L|\-\-size [\-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}
14
[\-v|\-\-verbose] LogicalVolume[Path]
6
.RB [ \-A | \-\-autobackup
8
.RB [ \-d | \-\-debug ]
10
.RB [ \-t | \-\-test ]
11
.RB [ \-v | \-\-verbose ]
13
.RB [ \-f | \-\-force ]
14
.RB [ \-\-noudevsync ]
15
.RB { \-l | \-\-extents
16
.RI [ \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN "}] |"
18
.RI [ \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
19
.RB [ \-n | \-\-nofsck ]
20
.RB [ \-r | \-\-resizefs ]
21
.IR LogicalVolume { Name | Path }
16
23
lvreduce allows you to reduce the size of a logical volume.
17
24
Be careful when reducing a logical volume's size, because data in the
23
30
running lvreduce so that the extents that are to be removed are not in use.
25
32
Shrinking snapshot logical volumes (see
27
34
for information to create snapshots) is supported as well.
28
35
But to change the number of copies in a mirrored logical
32
39
Sizes will be rounded if necessary - for example, the volume size must
33
40
be an exact number of extents and the size of a striped segment must
34
41
be a multiple of the number of stripes.
37
See \fBlvm\fP for common options.
48
.BR \-f ", " \-\-force
40
49
Force size reduction without prompting even when it may cause data loss.
43
52
Disable udev synchronisation. The
44
53
process will not wait for notification from udev.
45
54
It will continue irrespective of any possible udev processing
46
55
in the background. You should only use this if udev is not running
47
56
or has rules that ignore the devices LVM2 creates.
49
.I \-l, \-\-extents [\-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}]
58
.IR \fB\-l ", " \fB\-\-extents " [" \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN }]
50
59
Reduce or set the logical volume size in units of logical extents.
51
With the - sign the value will be subtracted from
60
With the \fI-\fP sign the value will be subtracted from
52
61
the logical volume's actual size and without it the value will be taken
53
62
as an absolute size.
54
63
The number can also be expressed as a percentage of the total space
55
in the Volume Group with the suffix %VG, relative to the existing
56
size of the Logical Volume with the suffix %LV, as a percentage of the
57
remaining free space in the Volume Group with the suffix %FREE, or (for
64
in the Volume Group with the suffix \fI%VG\fP, relative to the existing
65
size of the Logical Volume with the suffix \fI%LV\fP, as a percentage of the
66
remaining free space in the Volume Group with the suffix \fI%FREE\fP, or (for
58
67
a snapshot) as a percentage of the total space in the Origin Logical
59
Volume with the suffix %ORIGIN.
68
Volume with the suffix \fI%ORIGIN\fP.
69
The resulting value for the substraction is rounded downward, for the absolute
70
size it is rounded upward.
61
.I \-L, \-\-size [\-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]
72
.IR \fB\-L ", " \fB\-\-size " [" \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
62
73
Reduce or set the logical volume size in units of megabytes.
63
A size suffix of k for kilobyte, m for megabyte,
64
g for gigabytes, t for terabytes, p for petabytes
65
or e for exabytes is optional.
66
With the - sign the value will be subtracted from
74
A size suffix of \fIk\fP for kilobyte, \fIm\fP for megabyte,
75
\fIg\fP for gigabytes, \fIt\fP for terabytes, \fIp\fP for petabytes
76
or \fIe\fP for exabytes is optional.
77
With the \fI-\fP sign the value will be subtracted from
67
78
the logical volume's actual size and without it it will be taken as
81
.BR \-n ", " \-\-nofsck
71
82
Do not perform fsck before resizing filesystem when filesystem
72
83
requires it. You may need to use \fB--force\fR to proceed with
86
.BR \-r ", " \-\-resizefs
76
87
Resize underlying filesystem together with the logical volume using
79
"lvreduce -l -3 vg00/lvol1" reduces the size of logical volume lvol1
80
in volume group vg00 by 3 logical extents.
90
Reduce the size of logical volume lvol1 in volume group vg00 by 3 logical extents:
92
.B lvreduce -l -3 vg00/lvol1