~ubuntu-branches/ubuntu/saucy/lvm2/saucy

« back to all changes in this revision

Viewing changes to man/lvreduce.8.in

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2012-08-14 14:35:57 UTC
  • mfrom: (3.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20120814143557-93aill2tp3kf3o30
Tags: 2.02.95-4ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/patches/avoid-dev-block.patch: Prefer any other device name over
    names in /dev/block/ since lvm.conf won't handle this.
  - debian/rules:
    - copy .po file to .pot file for Rosetta (Ubuntu specific).
  - debian/{dmsetup,lvm2}-udeb.install:
    - install initramfs and udev hooks in udebs (Debian bug 504341).
  - auto-start VGs as their PVs are discovered (Ubuntu specific):
    - add debian/tree/lvm2/lib/udev/rules.d/85-lvm2.rules: use watershed plus
      the sledgehammer of vgscan/vgchange to turn on VGs as they come online.
    - debian/tree/lvm2/usr/share/initramfs-tools/scripts/hooks/lvm2:
      - add 85-lvm2.rules to the list of udev rules to copy.
      - depend on udev.
    - debian/control:
      - add versioned Depend on watershed in lvm2 for udev rules.
      - add Depends on watershed-udeb in lvm2-udeb for udev rules.
      - add versioned Depend/Breaks on udev in dmsetup for udev rules.
      - add Depend on initramfs-tools in dmsetup so system is not potentially
        rendered unbootable by out-of-order dpkg configuration.
    - debian/rules:
      - do not install local-top scripts since Ubuntu mounts root using udev.
      - do not install init scripts for lvm2, since udev starts LVM.
    - debian/lvm2.postinst: handle missing lvm2 init script.
    - debian/tree/dmsetup/lib/udev/rules.d/60-persistent-storage-dm.rules:
      watch dm devices for changes with inotify
  - add mountroot failure hooks to help fix bad boots (Debian bug 468115):
    - debian/tree/lvm2/usr/share/initramfs-tools/scripts/init-premount/lvm2
  - remaining changes to upstream event manager packages (Debian bug 514706):
    - debian/rules:
      - enable dmeventd during configure.
    - debian/dmeventd.{8,manpages}: install dmeventd files.
  - rename debian/clvm.defaults to debian/clvm.default so it is installed
    correctly.
  - debian/control: add dmsetup-udeb to libdevmapper1.02.1-udeb recommends.
  - debian/rules: make sure dmsetup and lvm2 initramfs-tools scripts are
    executable.  When the Ubuntu-specific ones are added with a patch,
    they may lose their executable bit.
  - Add and install clvmd resource agent
  - Add dependency on libudev-dev to libdevmapper-dev so that the .pc file
    works.
  - debian/{clvmd.ra,clvm.init}:
    - create /run/lvm if it doesn't exist.
  - debian/clvm.init:
    - exit 3 if not running on status action.
  - Call dh_installman so that our dmeventd manpage actually gets installed
  - Install the missing fsadm manpage.

 * libdevmapper-dev:
  - move .so symlinks and pkgconfig files to multiarched locations.
  - mark libdevmapper-dev M-A: same

 * libdevmapper-event1.02.1:
  - Add Breaks: dmeventd (<< 2.02.95-4ubuntu1) due to debian symbol rename

 * debian/lvm2.{preinst,postinst,postrm}:
  - Implement removal of obsolete /etc/init.d/lvm2 conffile, which
    should not have been re-introduced in Quantal.

 * Dropped Changes, included in Debian:
  - Mostly included packages for upstream event manager (Debian bug 514706).
  - debian/patches/rules-subdir.patch: removed as reordering will cause
    build failure with dmeventd.
  - debian/patches/libdm-event-static.patch: removed as other static libs
    aren't being built anymore either.
  - Update symbols for libdevmapper-event.
  - Update libdevmapper-event, dmeventd descriptions to match Debian
    boilerplate.

 * Disappeared Changes:
  - Don't install documentation in udebs. No diff found, but no docs are
    installed into udebs either.

 * Resurected Changes:
  - corrected dropping the wrong init script. Now clvm.init is shipped
    and lvm2.init is dropped in favor of udev rules as per original
    intention (LP: #1037033).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
lvreduce \- reduce the size of a logical volume
4
4
.SH SYNOPSIS
5
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]
 
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 }
15
22
.SH DESCRIPTION
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.
24
31
.br
25
32
Shrinking snapshot logical volumes (see
26
 
.B lvcreate(8)
 
33
.BR lvcreate (8)
27
34
for information to create snapshots) is supported as well.
28
35
But to change the number of copies in a mirrored logical
29
36
volume use 
30
 
.B lvconvert (8).
 
37
.BR lvconvert (8).
31
38
.br
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.
35
42
.br
36
43
.SH OPTIONS
37
 
See \fBlvm\fP for common options.
 
44
See 
 
45
.BR lvm (8)
 
46
for common options.
38
47
.TP
39
 
.I \-f, \-\-force
 
48
.BR \-f ", " \-\-force
40
49
Force size reduction without prompting even when it may cause data loss.
41
50
.TP
42
 
.I \-\-noudevsync
 
51
.BR \-\-noudevsync
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.
48
57
.TP
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.
60
71
.TP
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
68
79
an absolute size.
69
80
.TP
70
 
.I \-n, \-\-nofsck
 
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 
73
84
this option.
74
85
.TP
75
 
.I \-r, \-\-resizefs
 
86
.BR \-r ", " \-\-resizefs
76
87
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.
 
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
81
93
.SH SEE ALSO
82
94
.BR fsadm (8),
83
95
.BR lvchange (8),