]> sourceware.org Git - lvm2.git/blame - man/lvchange.8.in
man: expand lvchange --discard entry
[lvm2.git] / man / lvchange.8.in
CommitLineData
5951ef33 1.TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
922ce479
AK
2.SH NAME
3lvchange \- change attributes of a logical volume
4.SH SYNOPSIS
5.B lvchange
c63b155d
ZK
6.RB [ \-\-addtag
7.IR Tag ]
8.RB [ \-A | \-\-autobackup
9.RI { y | n }]
2729720f 10.RB [ \-a | \-\-activate
a54285a7 11.RI [ a | e | l ]{ y | n }]
c63b155d
ZK
12.RB [ \-\-alloc
13.IR AllocationPolicy ]
14.RB [ \-C | \-\-contiguous
15.RI { y | n }]
16.RB [ \-d | \-\-debug ]
17.RB [ \-\-deltag
18.IR Tag ]
48367c5b
ZK
19.RB [ \-\-discard
20.RI { ignore | nopassdown | passdown }]
c63b155d
ZK
21.RB [ \-\-resync ]
22.RB [ \-h | \-? | \-\-help ]
23.RB [ \-\-ignorelockingfailure ]
24.RB [ \-\-ignoremonitoring ]
25.RB [ \-\-monitor
26.RI { y | n }]
27.RB [ \-\-poll
28.RI { y | n }]
29.RB [ \-\-sysinit ]
30.RB [ \-\-noudevsync ]
31.RB [ \-M | \-\-persistent
32.RI { y | n }]
33.RB [ \-\-minor
34.IR minor ]
35.RB [ \-P | \-\-partial ]
36.RB [ \-p | \-\-permission
37.RI { r | rw }]
38.RB [ \-r | \-\-readahead
39.RI { ReadAheadSectors | auto | none }]
40.RB [ \-\-refresh ]
41.RB [ \-t | \-\-test ]
48367c5b
ZK
42.RB [ \-v | \-\-verbose ]
43.RB [ \-Z | \-\-zero
44.RI { y | n }]
c63b155d
ZK
45.I LogicalVolumePath
46.RI [ LogicalVolumePath ...]
922ce479 47.SH DESCRIPTION
d6cf4325
AK
48lvchange allows you to change the attributes of a logical volume
49including making them known to the kernel ready for use.
922ce479 50.SH OPTIONS
c63b155d 51See \fBlvm\fP(8) for common options.
922ce479 52.TP
a54285a7 53.BR \-a ", " \-\-activate " [" \fIa | \fIe | \fIl ]{ \fIy | \fIn }
922ce479 54Controls the availability of the logical volumes for use.
d6cf4325 55Communicates with the kernel device-mapper driver via
c63b155d 56libdevmapper to activate (\-ay) or deactivate (\-an) the
a54285a7
PR
57logical volumes. If autoactivation option is used (\-aay),
58the logical volume is activated only if it matches an item in
59the activation/auto_activation_volume_list set in lvm.conf.
60Autoactivation is not yet supported for logical volumes that
61are part of partial or clustered volume groups.
d6cf4325 62.IP
b2d6cb06 63If clustered locking is enabled, -aey will activate exclusively
d6cf4325
AK
64on one node and -aly will activate only on the local node.
65To deactivate only on the local node use -aln.
c63b155d 66Logical volumes with single-host snapshots are always activated
d6cf4325 67exclusively because they can only be used on one node at once.
922ce479 68.TP
c63b155d 69.BR \-C ", " \-\-contiguous " {" \fIy | \fIn }
5a52dca9 70Tries to set or reset the contiguous allocation policy for
922ce479
AK
71logical volumes. It's only possible to change a non-contiguous
72logical volume's allocation policy to contiguous, if all of the
73allocated physical extents are already contiguous.
74.TP
48367c5b 75.BR \-\-discard " {" \fIignore | \fInopassdown | \fIpassdown }
597590da
AK
76Set this to \fIignore\fP to ignore any discards received by a
77thin pool Logical Volume. Set to \fInopassdown\fP to process such
78discards within the thin pool itself and allow the no-longer-needed
79extents to be overwritten by new data. Set to \fIpassdown\fP to
80process them both within the thin pool itself and to pass them down
81the underlying device.
48367c5b 82.TP
c63b155d 83.B \-\-resync
b23f88bf
AK
84Forces the complete resynchronization of a mirror. In normal
85circumstances you should not need this option because synchronization
86happens automatically. Data is read from the primary mirror device
87and copied to the others, so this can take a considerable amount of
88time - and during this time you are without a complete redundant copy
89of your data.
04e023be 90.TP
c63b155d 91.B \-\-minor \fIminor
5a52dca9
AK
92Set the minor number.
93.TP
c63b155d 94.BR \-\-monitor " {" \fIy | \fIn }
a6bc975a 95Start or stop monitoring a mirrored or snapshot logical volume with
9380176b
AK
96dmeventd, if it is installed.
97If a device used by a monitored mirror reports an I/O error,
c63b155d 98the failure is handled according to
9380176b
AK
99\fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
100set in \fBlvm.conf\fP.
48432c88 101.TP
c63b155d 102.BR \-\-poll " {" \fIy | \fIn }
f407c8af
MS
103Without polling a logical volume's backgrounded transformation process
104will never complete. If there is an incomplete pvmove or lvconvert (for
c63b155d 105example, on rebooting after a crash), use \fB\-\-poll y\fP to restart the
f407c8af 106process from its last checkpoint. However, it may not be appropriate to
c63b155d
ZK
107immediately poll a logical volume when it is activated, use
108\fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
7a8fa6aa 109.TP
c63b155d
ZK
110.B \-\-sysinit
111Indicates that \fBlvchange\fP(8) is being invoked from early system
112initialisation scripts (e.g. rc.sysinit or an initrd),
113before writeable filesystems are available. As such,
114some functionality needs to be disabled and this option
d50c6d4b 115acts as a shortcut which selects an appropriate set of options. Currently
c63b155d
ZK
116this is equivalent to using \fB\-\-ignorelockingfailure\fP,
117\fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
118\fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
d50c6d4b 119environment variable.
cd8ea8b4
PR
120
121If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running,
122autoactivation is preferred over manual activation via direct lvchange call.
123Logical volumes are autoactivated according to auto_activation_volume_list
124set in lvm.conf(5).
d50c6d4b 125.TP
c63b155d 126.B \-\-noudevsync
b42929dc
AK
127Disable udev synchronisation. The
128process will not wait for notification from udev.
129It will continue irrespective of any possible udev processing
130in the background. You should only use this if udev is not running
131or has rules that ignore the devices LVM2 creates.
132.TP
c63b155d
ZK
133.B \-\-ignoremonitoring
134Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP
53c774b9
AK
135is specified.
136Do not use this if dmeventd is already monitoring a device.
137.TP
c63b155d 138.BR \-M ", " \-\-persistent " {" \fIy | \fIn }
5a52dca9
AK
139Set to y to make the minor number specified persistent.
140.TP
c63b155d 141.BR \-p ", " \-\-permission " {" \fIr | \fIrw }
922ce479
AK
142Change access permission to read-only or read/write.
143.TP
c63b155d 144.BR \-r ", " \-\-readahead " {" \fIReadAheadSectors | \fIauto | \fInone }
b4068515
AK
145Set read ahead sector count of this logical volume.
146For volume groups with metadata in lvm1 format, this must
b680c5c6 147be a value between 2 and 120 sectors.
b4068515
AK
148The default value is "auto" which allows the kernel to choose
149a suitable value automatically.
150"None" is equivalent to specifying zero.
d6cf4325 151.TP
c63b155d 152.B \-\-refresh
d6cf4325
AK
153If the logical volume is active, reload its metadata.
154This is not necessary in normal operation, but may be useful
c63b155d 155if something has gone wrong or if you're doing clustering
d6cf4325 156manually without a clustered lock manager.
48367c5b
ZK
157.TP
158.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
159Set zeroing mode for thin pool. Note: already provisioned blocks from pool
160in non-zero mode are not cleared in unwritten parts when setting zero to
161\fIy\fP.
922ce479 162.SH Examples
c63b155d
ZK
163Changes the permission on volume lvol1 in volume group vg00 to be read-only:
164.sp
165.B lvchange -pr vg00/lvol1
922ce479 166.SH SEE ALSO
c63b155d 167.BR lvm (8),
d6cf4325
AK
168.BR lvcreate (8),
169.BR vgchange (8)
This page took 0.102383 seconds and 5 git commands to generate.