import source from lvm2 2.02.79
[external/device-mapper.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 [\-\-addtag Tag]
7 [\-A|\-\-autobackup y|n] [\-a|\-\-available y|n|ey|en|ly|ln]
8 [\-\-alloc AllocationPolicy]
9 [\-C|\-\-contiguous y|n] [\-d|\-\-debug] [\-\-deltag Tag]
10 [\-\-resync]
11 [\-h|\-?|\-\-help]
12 [\-\-ignorelockingfailure]
13 [\-\-ignoremonitoring]
14 [\-\-monitor {y|n}]
15 [\-\-poll {y|n}]
16 [\-\-sysinit]
17 [\-\-noudevsync]
18 [\-M|\-\-persistent y|n] [\-\-minor minor]
19 [\-P|\-\-partial]
20 [\-p|\-\-permission r|rw] [\-r/\-\-readahead ReadAheadSectors|auto|none]
21 [\-\-refresh]
22 [\-t|\-\-test]
23 [\-v|\-\-verbose] LogicalVolumePath [LogicalVolumePath...]
24 .SH DESCRIPTION
25 lvchange allows you to change the attributes of a logical volume
26 including making them known to the kernel ready for use.
27 .SH OPTIONS
28 See \fBlvm\fP for common options.
29 .TP
30 .I \-a, \-\-available y|n|ey|en|ly|ln
31 Controls the availability of the logical volumes for use.
32 Communicates with the kernel device-mapper driver via
33 libdevmapper to activate (-ay) or deactivate (-an) the 
34 logical volumes.
35 .IP
36 If clustered locking is enabled, -aey will activate exclusively
37 on one node and -aly will activate only on the local node.
38 To deactivate only on the local node use -aln.
39 Logical volumes with single-host snapshots are always activated 
40 exclusively because they can only be used on one node at once.
41 .TP
42 .I \-C, \-\-contiguous y|n
43 Tries to set or reset the contiguous allocation policy for
44 logical volumes. It's only possible to change a non-contiguous
45 logical volume's allocation policy to contiguous, if all of the
46 allocated physical extents are already contiguous.
47 .TP
48 .I \-\-resync
49 Forces the complete resynchronization of a mirror.  In normal
50 circumstances you should not need this option because synchronization
51 happens automatically.  Data is read from the primary mirror device
52 and copied to the others, so this can take a considerable amount of
53 time - and during this time you are without a complete redundant copy
54 of your data.
55 .TP
56 .I \-\-minor minor
57 Set the minor number.
58 .TP
59 .I \-\-monitor y|n
60 Start or stop monitoring a mirrored or snapshot logical volume with
61 dmeventd, if it is installed.
62 If a device used by a monitored mirror reports an I/O error,
63 the failure is handled according to 
64 \fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
65 set in \fBlvm.conf\fP.
66 .TP
67 .I \-\-poll y|n
68 Without polling a logical volume's backgrounded transformation process
69 will never complete.  If there is an incomplete pvmove or lvconvert (for
70 example, on rebooting after a crash), use \fB--poll y\fP to restart the
71 process from its last checkpoint.  However, it may not be appropriate to
72 immediately poll a logical volume when it is activated, use \fB--poll
73 n\fP to defer and then \fB--poll y\fP to restart the process.
74 .TP
75 .I \-\-sysinit
76 Indicates that lvchange(8) is being invoked from early system initialisation
77 scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are
78 available. As such, some functionality needs to be disabled and this option
79 acts as a shortcut which selects an appropriate set of options. Currently
80 this is equivalent to using  \fB--ignorelockingfailure\fP, \fB--ignoremonitoring\fP,
81 \fB--poll n\fP and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
82 environment variable.
83 .TP
84 .I \-\-noudevsync
85 Disable udev synchronisation. The
86 process will not wait for notification from udev.
87 It will continue irrespective of any possible udev processing
88 in the background.  You should only use this if udev is not running
89 or has rules that ignore the devices LVM2 creates.
90 .TP
91 .I \-\-ignoremonitoring
92 Make no attempt to interact with dmeventd unless \-\-monitor
93 is specified.
94 Do not use this if dmeventd is already monitoring a device.
95 .TP
96 .I \-M, \-\-persistent y|n
97 Set to y to make the minor number specified persistent.
98 .TP
99 .I \-p, \-\-permission r|rw
100 Change access permission to read-only or read/write.
101 .TP
102 .I \-r, \-\-readahead ReadAheadSectors|auto|none
103 Set read ahead sector count of this logical volume.
104 For volume groups with metadata in lvm1 format, this must
105 be a value between 2 and 120 sectors.
106 The default value is "auto" which allows the kernel to choose
107 a suitable value automatically.
108 "None" is equivalent to specifying zero.
109 .TP
110 .I \-\-refresh
111 If the logical volume is active, reload its metadata.
112 This is not necessary in normal operation, but may be useful
113 if something has gone wrong or if you're doing clustering 
114 manually without a clustered lock manager.
115 .SH Examples
116 "lvchange -pr vg00/lvol1" changes the permission on 
117 volume lvol1 in volume group vg00 to be read-only.
118
119 .SH SEE ALSO
120 .BR lvm (8), 
121 .BR lvcreate (8),
122 .BR vgchange (8)