Tizen 2.1 base
[external/device-mapper.git] / man / lvresize.8.in
1 .TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
2 .SH NAME
3 lvresize \- resize a logical volume
4 .SH SYNOPSIS
5 .B lvresize
6 [\-\-alloc AllocationPolicy]
7 [\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-h|\-?|\-\-help]
8 [\-\-noudevsync]
9 [\-i|\-\-stripes Stripes [\-I|\-\-stripesize StripeSize]]
10 {\-l|\-\-extents [+]LogicalExtentsNumber[%{VG|LV|PVS|FREE|ORIGIN}] |
11 \-L|\-\-size [+]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}
12 [\-f|\-\-force]
13 [\-n|\-\-nofsck]
14 [\-r|\-\-resizefs]
15 [\-t|\-\-test]
16 [\-v|\-\-verbose] LogicalVolumePath [PhysicalVolumePath[:PE[-PE]]...]
17 .SH DESCRIPTION
18 lvresize allows you to resize a logical volume.
19 Be careful when reducing a logical volume's size, because data in the reduced
20 part is lost!!!
21 You should therefore ensure that any filesystem on the volume is
22 shrunk first so that the extents that are to be removed are not in use.
23 Resizing snapshot logical volumes (see
24 .B lvcreate(8)
25 for information about creating snapshots) is supported as well.
26 But to change the number of copies in a mirrored logical
27 volume use 
28 .BR lvconvert (8).
29 .SH OPTIONS
30 See \fBlvm\fP for common options.
31 .TP
32 .I \-f, \-\-force
33 Force resize without prompting even when it may cause data loss.
34 .TP
35 .I \-l, \-\-extents [+|-]LogicalExtentsNumber[%{VG|LV|PVS|FREE|ORIGIN}]
36 Change or set the logical volume size in units of logical extents.
37 With the + or - sign the value is added to or subtracted from the actual size
38 of the logical volume and without it, the value is taken as an absolute one.
39 The number can also be expressed as a percentage of the total space
40 in the Volume Group with the suffix %VG, relative to the existing
41 size of the Logical Volume with the suffix %LV, as a percentage of
42 the remaining free space of the PhysicalVolumes on the command line with the
43 suffix %PVS, as a percentage of the remaining free space in the
44 Volume Group with the suffix %FREE, or (for a snapshot) as a percentage
45 of the total space in the Origin Logical Volume with the suffix %ORIGIN.
46 .TP
47 .I \-n, \-\-nofsck
48 Do not perform fsck before resizing filesystem when filesystem
49 requires it. You may need to use \fB--force\fR to proceed with 
50 this option.
51 .TP
52 .I \-\-noudevsync
53 Disable udev synchronisation. The
54 process will not wait for notification from udev.
55 It will continue irrespective of any possible udev processing
56 in the background.  You should only use this if udev is not running
57 or has rules that ignore the devices LVM2 creates.
58 .TP
59 .I \-r, \-\-resizefs
60 Resize underlying filesystem together with the logical volume using 
61 \fBfsadm\fR(8).
62 .TP
63 .I \-L, \-\-size [+|-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]
64 Change or set the logical volume size in units of megabytes.
65 A size suffix of M for megabytes,
66 G for gigabytes, T for terabytes, P for petabytes 
67 or E for exabytes is optional.
68 With the + or - sign the value is added to or subtracted from
69 the actual size of the logical volume and without it, the value is taken as an
70 absolute one.
71 .TP
72 .I \-i, \-\-stripes Stripes
73 Gives the number of stripes to use when extending a Logical Volume.
74 Defaults to whatever the last segment of the Logical Volume uses.
75 Not applicable to LVs using the original metadata LVM format, which must
76 use a single value throughout.
77 .TP
78 .I \-I, \-\-stripesize StripeSize
79 Gives the number of kilobytes for the granularity of the stripes.
80 Defaults to whatever the last segment of the Logical Volume uses.
81 Not applicable to LVs using the original metadata LVM format, which
82 must use a single value throughout.
83 .br
84 StripeSize must be 2^n (n = 2 to 9)
85 .SH Examples
86 .br
87 "lvresize -L+16M vg1/lv1 /dev/sda:0-1 /dev/sdb:0-1"
88 .br
89 tries to extend a logical volume "vg1/lv1" by 16MB using physical extents
90 /dev/sda:0-1 and /dev/sdb:0-1 for allocation of extents.
91
92 .SH SEE ALSO
93 .BR fsadm (8),
94 .BR lvm (8), 
95 .BR lvconvert (8),
96 .BR lvcreate (8), 
97 .BR lvreduce (8), 
98 .BR lvchange (8)