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