Import lvm2 from NetBSD
[dragonfly.git] / contrib / lvm2 / dist / man / lvreduce.8
1 .\"    $NetBSD: lvreduce.8,v 1.2 2009/02/18 12:16:13 haad Exp $
2 .\"
3 .TH LVREDUCE 8 "LVM TOOLS 2.02.44-cvs (02-17-09)" "Sistina Software UK" \" -*- nroff -*-
4 .SH NAME
5 lvreduce \- reduce the size of a logical volume
6 .SH SYNOPSIS
7 .B lvreduce
8 [\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-f|\-\-force]
9 [\-h|\-?|\-\-help]
10 {\-l|\-\-extents [\-]LogicalExtentsNumber[%{VG|LV|FREE}] |
11 \-L|\-\-size [\-]LogicalVolumeSize[kKmMgGtT]}
12 [\-t|\-\-test]
13 [\-v|\-\-verbose] LogicalVolume[Path]
14 .SH DESCRIPTION
15 lvreduce allows you to reduce the size of a logical volume.
16 Be careful when reducing a logical volume's size, because data in the
17 reduced part is lost!!! 
18 .br 
19 You should therefore ensure that any filesystem on the volume is 
20 resized
21 .I before
22 running lvreduce so that the extents that are to be removed are not in use.
23 .br
24 Shrinking snapshot logical volumes (see
25 .B lvcreate(8)
26 for information to create snapshots) is supported as well.
27 But to change the number of copies in a mirrored logical
28 volume use 
29 .B lvconvert (8).
30 .br
31 Sizes will be rounded if necessary - for example, the volume size must
32 be an exact number of extents and the size of a striped segment must
33 be a multiple of the number of stripes.
34 .br
35 .SH OPTIONS
36 See \fBlvm\fP for common options.
37 .TP
38 .I \-f, \-\-force
39 Force size reduction without any question.
40 .TP
41 .I \-l, \-\-extents [\-]LogicalExtentsNumber[%{VG|LV|FREE}]
42 Reduce or set the logical volume size in units of logical extents.
43 With the - sign the value will be subtracted from
44 the logical volume's actual size and without it the will be taken as
45 an absolute size.
46 The number can also be expressed as a percentage of the total space
47 in the Volume Group with the suffix %VG or relative to the existing
48 size of the Logical Volume with the suffix %LV or as a percentage of the remaining
49 free space in the Volume Group with the suffix %FREE.
50 .TP
51 .I \-L, \-\-size [\-]LogicalVolumeSize[kKmMgGtTpPeE]
52 Reduce or set the logical volume size in units of megabyte by default.
53 A size suffix of k for kilobyte, m for megabyte, 
54 g for gigabytes, t for terabytes, p for petabytes 
55 or e for exabytes is optional.
56 With the - sign the value will be subtracted from
57 the logical volume's actual size and without it it will be taken as
58 an absolute size.
59 .SH Example
60 "lvreduce -l -3 vg00/lvol1" reduces the size of logical volume lvol1
61 in volume group vg00 by 3 logical extents.
62 .SH SEE ALSO
63 .BR lvchange (8),
64 .BR lvconvert (8), 
65 .BR lvcreate (8), 
66 .BR lvextend (8), 
67 .BR lvm (8), 
68 .BR lvresize (8),
69 .BR vgreduce (8)