]> sourceware.org Git - lvm2.git/blob - man/lvchange.8.in
thin: add lvchange for discard and zero change
[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 Change discard behavior.
77 .TP
78 .B \-\-resync
79 Forces the complete resynchronization of a mirror. In normal
80 circumstances you should not need this option because synchronization
81 happens automatically. Data is read from the primary mirror device
82 and copied to the others, so this can take a considerable amount of
83 time - and during this time you are without a complete redundant copy
84 of your data.
85 .TP
86 .B \-\-minor \fIminor
87 Set the minor number.
88 .TP
89 .BR \-\-monitor " {" \fIy | \fIn }
90 Start or stop monitoring a mirrored or snapshot logical volume with
91 dmeventd, if it is installed.
92 If a device used by a monitored mirror reports an I/O error,
93 the failure is handled according to
94 \fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
95 set in \fBlvm.conf\fP.
96 .TP
97 .BR \-\-poll " {" \fIy | \fIn }
98 Without polling a logical volume's backgrounded transformation process
99 will never complete. If there is an incomplete pvmove or lvconvert (for
100 example, on rebooting after a crash), use \fB\-\-poll y\fP to restart the
101 process from its last checkpoint. However, it may not be appropriate to
102 immediately poll a logical volume when it is activated, use
103 \fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
104 .TP
105 .B \-\-sysinit
106 Indicates that \fBlvchange\fP(8) is being invoked from early system
107 initialisation scripts (e.g. rc.sysinit or an initrd),
108 before writeable filesystems are available. As such,
109 some functionality needs to be disabled and this option
110 acts as a shortcut which selects an appropriate set of options. Currently
111 this is equivalent to using \fB\-\-ignorelockingfailure\fP,
112 \fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
113 \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
114 environment variable.
115
116 If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running,
117 autoactivation is preferred over manual activation via direct lvchange call.
118 Logical volumes are autoactivated according to auto_activation_volume_list
119 set in lvm.conf(5).
120 .TP
121 .B \-\-noudevsync
122 Disable udev synchronisation. The
123 process will not wait for notification from udev.
124 It will continue irrespective of any possible udev processing
125 in the background. You should only use this if udev is not running
126 or has rules that ignore the devices LVM2 creates.
127 .TP
128 .B \-\-ignoremonitoring
129 Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP
130 is specified.
131 Do not use this if dmeventd is already monitoring a device.
132 .TP
133 .BR \-M ", " \-\-persistent " {" \fIy | \fIn }
134 Set to y to make the minor number specified persistent.
135 .TP
136 .BR \-p ", " \-\-permission " {" \fIr | \fIrw }
137 Change access permission to read-only or read/write.
138 .TP
139 .BR \-r ", " \-\-readahead " {" \fIReadAheadSectors | \fIauto | \fInone }
140 Set read ahead sector count of this logical volume.
141 For volume groups with metadata in lvm1 format, this must
142 be a value between 2 and 120 sectors.
143 The default value is "auto" which allows the kernel to choose
144 a suitable value automatically.
145 "None" is equivalent to specifying zero.
146 .TP
147 .B \-\-refresh
148 If the logical volume is active, reload its metadata.
149 This is not necessary in normal operation, but may be useful
150 if something has gone wrong or if you're doing clustering
151 manually without a clustered lock manager.
152 .TP
153 .BR \-Z ", " \-\-zero " {" \fIy | \fIn }
154 Set zeroing mode for thin pool. Note: already provisioned blocks from pool
155 in non-zero mode are not cleared in unwritten parts when setting zero to
156 \fIy\fP.
157 .SH Examples
158 Changes the permission on volume lvol1 in volume group vg00 to be read-only:
159 .sp
160 .B lvchange -pr vg00/lvol1
161 .SH SEE ALSO
162 .BR lvm (8),
163 .BR lvcreate (8),
164 .BR vgchange (8)
This page took 0.045395 seconds and 6 git commands to generate.