]>
Commit | Line | Data |
---|---|---|
5951ef33 | 1 | .TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*- |
922ce479 AK |
2 | .SH NAME |
3 | lvchange \- 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 |
48 | lvchange allows you to change the attributes of a logical volume |
49 | including making them known to the kernel ready for use. | |
922ce479 | 50 | .SH OPTIONS |
c63b155d | 51 | See \fBlvm\fP(8) for common options. |
922ce479 | 52 | .TP |
a54285a7 | 53 | .BR \-a ", " \-\-activate " [" \fIa | \fIe | \fIl ]{ \fIy | \fIn } |
922ce479 | 54 | Controls the availability of the logical volumes for use. |
d6cf4325 | 55 | Communicates with the kernel device-mapper driver via |
c63b155d | 56 | libdevmapper to activate (\-ay) or deactivate (\-an) the |
a54285a7 PR |
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. | |
d6cf4325 | 62 | .IP |
b2d6cb06 | 63 | If clustered locking is enabled, -aey will activate exclusively |
d6cf4325 AK |
64 | on one node and -aly will activate only on the local node. |
65 | To deactivate only on the local node use -aln. | |
c63b155d | 66 | Logical volumes with single-host snapshots are always activated |
d6cf4325 | 67 | exclusively because they can only be used on one node at once. |
922ce479 | 68 | .TP |
c63b155d | 69 | .BR \-C ", " \-\-contiguous " {" \fIy | \fIn } |
5a52dca9 | 70 | Tries to set or reset the contiguous allocation policy for |
922ce479 AK |
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 | |
48367c5b | 75 | .BR \-\-discard " {" \fIignore | \fInopassdown | \fIpassdown } |
597590da AK |
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. | |
48367c5b | 82 | .TP |
c63b155d | 83 | .B \-\-resync |
b23f88bf AK |
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. | |
04e023be | 90 | .TP |
c63b155d | 91 | .B \-\-minor \fIminor |
5a52dca9 AK |
92 | Set the minor number. |
93 | .TP | |
c63b155d | 94 | .BR \-\-monitor " {" \fIy | \fIn } |
a6bc975a | 95 | Start or stop monitoring a mirrored or snapshot logical volume with |
9380176b AK |
96 | dmeventd, if it is installed. |
97 | If a device used by a monitored mirror reports an I/O error, | |
c63b155d | 98 | the failure is handled according to |
9380176b AK |
99 | \fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP |
100 | set in \fBlvm.conf\fP. | |
48432c88 | 101 | .TP |
c63b155d | 102 | .BR \-\-poll " {" \fIy | \fIn } |
f407c8af MS |
103 | Without polling a logical volume's backgrounded transformation process |
104 | will never complete. If there is an incomplete pvmove or lvconvert (for | |
c63b155d | 105 | example, on rebooting after a crash), use \fB\-\-poll y\fP to restart the |
f407c8af | 106 | process from its last checkpoint. However, it may not be appropriate to |
c63b155d ZK |
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. | |
7a8fa6aa | 109 | .TP |
c63b155d ZK |
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 | |
d50c6d4b | 115 | acts as a shortcut which selects an appropriate set of options. Currently |
c63b155d ZK |
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 | |
d50c6d4b | 119 | environment variable. |
cd8ea8b4 PR |
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). | |
d50c6d4b | 125 | .TP |
c63b155d | 126 | .B \-\-noudevsync |
b42929dc AK |
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 | |
c63b155d ZK |
133 | .B \-\-ignoremonitoring |
134 | Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP | |
53c774b9 AK |
135 | is specified. |
136 | Do not use this if dmeventd is already monitoring a device. | |
137 | .TP | |
c63b155d | 138 | .BR \-M ", " \-\-persistent " {" \fIy | \fIn } |
5a52dca9 AK |
139 | Set to y to make the minor number specified persistent. |
140 | .TP | |
c63b155d | 141 | .BR \-p ", " \-\-permission " {" \fIr | \fIrw } |
922ce479 AK |
142 | Change access permission to read-only or read/write. |
143 | .TP | |
c63b155d | 144 | .BR \-r ", " \-\-readahead " {" \fIReadAheadSectors | \fIauto | \fInone } |
b4068515 AK |
145 | Set read ahead sector count of this logical volume. |
146 | For volume groups with metadata in lvm1 format, this must | |
b680c5c6 | 147 | be a value between 2 and 120 sectors. |
b4068515 AK |
148 | The default value is "auto" which allows the kernel to choose |
149 | a suitable value automatically. | |
150 | "None" is equivalent to specifying zero. | |
d6cf4325 | 151 | .TP |
c63b155d | 152 | .B \-\-refresh |
d6cf4325 AK |
153 | If the logical volume is active, reload its metadata. |
154 | This is not necessary in normal operation, but may be useful | |
c63b155d | 155 | if something has gone wrong or if you're doing clustering |
d6cf4325 | 156 | manually without a clustered lock manager. |
48367c5b ZK |
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. | |
922ce479 | 162 | .SH Examples |
c63b155d ZK |
163 | Changes 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) |