]>
Commit | Line | Data |
---|---|---|
5951ef33 | 1 | .TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*- |
922ce479 AK |
2 | .SH NAME |
3 | lvreduce \- reduce the size of a logical volume | |
4 | .SH SYNOPSIS | |
5 | .B lvreduce | |
59cf7b6f ZK |
6 | .RB [ \-A | \-\-autobackup |
7 | .RI { y | n }] | |
8 | .RB [ \-d | \-\-debug ] | |
9 | .RB [ \-h | \-\-help ] | |
10 | .RB [ \-t | \-\-test ] | |
11 | .RB [ \-v | \-\-verbose ] | |
12 | .RB [ \-\-version ] | |
13 | .RB [ \-f | \-\-force ] | |
14 | .RB [ \-\-noudevsync ] | |
15 | .RB { \-l | \-\-extents | |
16 | .RI [ \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN "}] |" | |
17 | .RB [ \-L | \-\-size | |
18 | .RI [ \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]} | |
19 | .RB [ \-n | \-\-nofsck ] | |
20 | .RB [ \-r | \-\-resizefs ] | |
21 | .IR LogicalVolume { Name | Path } | |
922ce479 AK |
22 | .SH DESCRIPTION |
23 | lvreduce allows you to reduce the size of a logical volume. | |
24 | Be careful when reducing a logical volume's size, because data in the | |
25 | reduced part is lost!!! | |
26 | .br | |
17823680 | 27 | You should therefore ensure that any filesystem on the volume is |
922ce479 | 28 | resized |
21c42c7f | 29 | .I before |
922ce479 | 30 | running lvreduce so that the extents that are to be removed are not in use. |
d5ec0504 | 31 | .br |
922ce479 | 32 | Shrinking snapshot logical volumes (see |
59cf7b6f | 33 | .BR lvcreate (8) |
922ce479 | 34 | for information to create snapshots) is supported as well. |
9380176b AK |
35 | But to change the number of copies in a mirrored logical |
36 | volume use | |
59cf7b6f | 37 | .BR lvconvert (8). |
63bea03e AK |
38 | .br |
39 | Sizes will be rounded if necessary - for example, the volume size must | |
40 | be an exact number of extents and the size of a striped segment must | |
41 | be a multiple of the number of stripes. | |
48432c88 | 42 | .br |
922ce479 | 43 | .SH OPTIONS |
59cf7b6f ZK |
44 | See |
45 | .BR lvm (8) | |
46 | for common options. | |
922ce479 | 47 | .TP |
59cf7b6f | 48 | .BR \-f ", " \-\-force |
b4ee0035 | 49 | Force size reduction without prompting even when it may cause data loss. |
922ce479 | 50 | .TP |
59cf7b6f | 51 | .BR \-\-noudevsync |
c48b1005 PR |
52 | Disable udev synchronisation. The |
53 | process will not wait for notification from udev. | |
54 | It will continue irrespective of any possible udev processing | |
55 | in the background. You should only use this if udev is not running | |
56 | or has rules that ignore the devices LVM2 creates. | |
57 | .TP | |
59cf7b6f | 58 | .IR \fB\-l ", " \fB\-\-extents " [" \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN }] |
922ce479 | 59 | Reduce or set the logical volume size in units of logical extents. |
59cf7b6f | 60 | With the \fI-\fP sign the value will be subtracted from |
5bc2af26 MS |
61 | the logical volume's actual size and without it the value will be taken |
62 | as an absolute size. | |
34fadac4 | 63 | The number can also be expressed as a percentage of the total space |
59cf7b6f ZK |
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 | |
5bc2af26 | 67 | a snapshot) as a percentage of the total space in the Origin Logical |
59cf7b6f | 68 | Volume with the suffix \fI%ORIGIN\fP. |
4fbde014 ZK |
69 | The resulting value for the substraction is rounded downward, for the absolute |
70 | size it is rounded upward. | |
922ce479 | 71 | .TP |
59cf7b6f | 72 | .IR \fB\-L ", " \fB\-\-size " [" \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ] |
3d425215 | 73 | Reduce or set the logical volume size in units of megabytes. |
59cf7b6f ZK |
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 | |
17823680 | 78 | the logical volume's actual size and without it it will be taken as |
922ce479 | 79 | an absolute size. |
50b906ab | 80 | .TP |
59cf7b6f | 81 | .BR \-n ", " \-\-nofsck |
50b906ab ZK |
82 | Do not perform fsck before resizing filesystem when filesystem |
83 | requires it. You may need to use \fB--force\fR to proceed with | |
b4ee0035 | 84 | this option. |
50b906ab | 85 | .TP |
59cf7b6f | 86 | .BR \-r ", " \-\-resizefs |
b4ee0035 | 87 | Resize underlying filesystem together with the logical volume using |
59cf7b6f ZK |
88 | .BR fsadm (8). |
89 | .SH EXAMPLES | |
90 | Reduce the size of logical volume lvol1 in volume group vg00 by 3 logical extents: | |
91 | .sp | |
92 | .B lvreduce -l -3 vg00/lvol1 | |
922ce479 | 93 | .SH SEE ALSO |
50b906ab | 94 | .BR fsadm (8), |
63bea03e | 95 | .BR lvchange (8), |
48432c88 | 96 | .BR lvconvert (8), |
922ce479 AK |
97 | .BR lvcreate (8), |
98 | .BR lvextend (8), | |
63bea03e AK |
99 | .BR lvm (8), |
100 | .BR lvresize (8), | |
101 | .BR vgreduce (8) |