Tizen 2.1 base
[external/device-mapper.git] / man / lvreduce.8.in
1 .TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
2 .SH NAME
3 lvreduce \- reduce the size of a logical volume
4 .SH SYNOPSIS
5 .B lvreduce
6 [\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-f|\-\-force]
7 [\-h|\-?|\-\-help]
8 [\-\-noudevsync]
9 {\-l|\-\-extents [\-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}] |
10 \-L|\-\-size [\-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}
11 [\-n|\-\-nofsck]
12 [\-r|\-\-resizefs]
13 [\-t|\-\-test]
14 [\-v|\-\-verbose] LogicalVolume[Path]
15 .SH DESCRIPTION
16 lvreduce allows you to reduce the size of a logical volume.
17 Be careful when reducing a logical volume's size, because data in the
18 reduced part is lost!!! 
19 .br 
20 You should therefore ensure that any filesystem on the volume is 
21 resized
22 .I before
23 running lvreduce so that the extents that are to be removed are not in use.
24 .br
25 Shrinking snapshot logical volumes (see
26 .B lvcreate(8)
27 for information to create snapshots) is supported as well.
28 But to change the number of copies in a mirrored logical
29 volume use 
30 .B lvconvert (8).
31 .br
32 Sizes will be rounded if necessary - for example, the volume size must
33 be an exact number of extents and the size of a striped segment must
34 be a multiple of the number of stripes.
35 .br
36 .SH OPTIONS
37 See \fBlvm\fP for common options.
38 .TP
39 .I \-f, \-\-force
40 Force size reduction without prompting even when it may cause data loss.
41 .TP
42 .I \-\-noudevsync
43 Disable udev synchronisation. The
44 process will not wait for notification from udev.
45 It will continue irrespective of any possible udev processing
46 in the background.  You should only use this if udev is not running
47 or has rules that ignore the devices LVM2 creates.
48 .TP
49 .I \-l, \-\-extents [\-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}]
50 Reduce or set the logical volume size in units of logical extents.
51 With the - sign the value will be subtracted from
52 the logical volume's actual size and without it the value will be taken
53 as an absolute size.
54 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
58 a snapshot) as a percentage of the total space in the Origin Logical
59 Volume with the suffix %ORIGIN.
60 .TP
61 .I \-L, \-\-size [\-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]
62 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
67 the logical volume's actual size and without it it will be taken as
68 an absolute size.
69 .TP
70 .I \-n, \-\-nofsck
71 Do not perform fsck before resizing filesystem when filesystem
72 requires it. You may need to use \fB--force\fR to proceed with 
73 this option.
74 .TP
75 .I \-r, \-\-resizefs
76 Resize underlying filesystem together with the logical volume using 
77 \fBfsadm\fR(8).
78 .SH Example
79 "lvreduce -l -3 vg00/lvol1" reduces the size of logical volume lvol1
80 in volume group vg00 by 3 logical extents.
81 .SH SEE ALSO
82 .BR fsadm (8),
83 .BR lvchange (8),
84 .BR lvconvert (8), 
85 .BR lvcreate (8), 
86 .BR lvextend (8), 
87 .BR lvm (8), 
88 .BR lvresize (8),
89 .BR vgreduce (8)