1LVREMOVE(8) System Manager's Manual LVREMOVE(8)
2
3
4
6 lvremove - Remove logical volume(s) from the system
7
9 lvremove position_args
10 [ option_args ]
11
13 lvremove removes one or more LVs. For standard LVs, this returns the
14 logical extents that were used by the LV to the VG for use by other
15 LVs.
16
17 Confirmation will be requested before deactivating any active LV prior
18 to removal. LVs cannot be deactivated or removed while they are open
19 (e.g. if they contain a mounted filesystem). Removing an origin LV
20 will also remove all dependent snapshots.
21
22 When a single force option is used, LVs are removed without confirma‐
23 tion, and the command will try to deactivate unused LVs.
24
25 To remove damaged LVs, two force options may be required (-ff).
26
27 Historical LVs
28
29 If the configuration setting metadata/record_lvs_history is enabled and
30 the LV being removed forms part of the history of at least one LV that
31 is still present, then a simplified representation of the LV will be
32 retained. This includes the time of removal (lv_time_removed reporting
33 field), creation time (lv_time), name (lv_name), LV uuid (lv_uuid) and
34 VG name (vg_name). This allows later reporting to see the ancestry
35 chain of thin snapshot volumes, even after some intermediate LVs have
36 been removed. The names of such historical LVs acquire a hyphen as a
37 prefix (e.g. '-lvol1') and cannot be reactivated. Use lvremove a sec‐
38 ond time, with the hyphen, to remove the record of the former LV com‐
39 pletely.
40
42 lvremove VG|LV|Tag|Select ...
43 [ -A|--autobackup y|n ]
44 [ -f|--force ]
45 [ -S|--select String ]
46 [ --nohistory ]
47 [ --noudevsync ]
48 [ --reportformat basic|json ]
49 [ COMMON_OPTIONS ]
50
51 Common options for lvm:
52 [ -d|--debug ]
53 [ -h|--help ]
54 [ -q|--quiet ]
55 [ -t|--test ]
56 [ -v|--verbose ]
57 [ -y|--yes ]
58 [ --commandprofile String ]
59 [ --config String ]
60 [ --driverloaded y|n ]
61 [ --lockopt String ]
62 [ --longhelp ]
63 [ --nolocking ]
64 [ --profile String ]
65 [ --version ]
66
68 -A|--autobackup y|n
69 Specifies if metadata should be backed up automatically after a
70 change. Enabling this is strongly advised! See vgcfgbackup(8)
71 for more information.
72
73 --commandprofile String
74 The command profile to use for command configuration. See
75 lvm.conf(5) for more information about profiles.
76
77 --config String
78 Config settings for the command. These override lvm.conf set‐
79 tings. The String arg uses the same format as lvm.conf, or may
80 use section/field syntax. See lvm.conf(5) for more information
81 about config.
82
83 -d|--debug ...
84 Set debug level. Repeat from 1 to 6 times to increase the detail
85 of messages sent to the log file and/or syslog (if configured).
86
87 --driverloaded y|n
88 If set to no, the command will not attempt to use device-mapper.
89 For testing and debugging.
90
91 -f|--force ...
92 Override various checks, confirmations and protections. Use
93 with extreme caution.
94
95 -h|--help
96 Display help text.
97
98 --lockopt String
99 Used to pass options for special cases to lvmlockd. See lvm‐
100 lockd(8) for more information.
101
102 --longhelp
103 Display long help text.
104
105 --nohistory
106 Do not record history of LVs being removed. This has no effect
107 unless the configuration setting metadata/record_lvs_history is
108 enabled.
109
110 --nolocking
111 Disable locking.
112
113 --noudevsync
114 Disables udev synchronisation. The process will not wait for
115 notification from udev. It will continue irrespective of any
116 possible udev processing in the background. Only use this if
117 udev is not running or has rules that ignore the devices LVM
118 creates.
119
120 --profile String
121 An alias for --commandprofile or --metadataprofile, depending on
122 the command.
123
124 -q|--quiet ...
125 Suppress output and log messages. Overrides --debug and --ver‐
126 bose. Repeat once to also suppress any prompts with answer
127 'no'.
128
129 --reportformat basic|json
130 Overrides current output format for reports which is defined
131 globally by the report/output_format setting in lvm.conf. basic
132 is the original format with columns and rows. If there is more
133 than one report per command, each report is prefixed with the
134 report name for identification. json produces report output in
135 JSON format. See lvmreport(7) for more information.
136
137 -S|--select String
138 Select objects for processing and reporting based on specified
139 criteria. The criteria syntax is described by --select help and
140 lvmreport(7). For reporting commands, one row is displayed for
141 each object matching the criteria. See --options help for
142 selectable object fields. Rows can be displayed with an addi‐
143 tional "selected" field (-o selected) showing 1 if the row
144 matches the selection and 0 otherwise. For non-reporting com‐
145 mands which process LVM entities, the selection is used to
146 choose items to process.
147
148 -t|--test
149 Run in test mode. Commands will not update metadata. This is
150 implemented by disabling all metadata writing but nevertheless
151 returning success to the calling function. This may lead to
152 unusual error messages in multi-stage operations if a tool
153 relies on reading back metadata it believes has changed but
154 hasn't.
155
156 -v|--verbose ...
157 Set verbose level. Repeat from 1 to 4 times to increase the
158 detail of messages sent to stdout and stderr.
159
160 --version
161 Display version information.
162
163 -y|--yes
164 Do not prompt for confirmation interactively but always assume
165 the answer yes. Use with extreme caution. (For automatic no,
166 see -qq.)
167
169 VG
170 Volume Group name. See lvm(8) for valid names.
171
172 LV
173 Logical Volume name. See lvm(8) for valid names. An LV posi‐
174 tional arg generally includes the VG name and LV name, e.g.
175 VG/LV.
176
177 Tag
178 Tag name. See lvm(8) for information about tag names and using
179 tags in place of a VG, LV or PV.
180
181 Select
182 Select indicates that a required positional parameter can be
183 omitted if the --select option is used. No arg appears in this
184 position.
185
186 String
187 See the option description for information about the string con‐
188 tent.
189
190 Size[UNIT]
191 Size is an input number that accepts an optional unit. Input
192 units are always treated as base two values, regardless of capi‐
193 talization, e.g. 'k' and 'K' both refer to 1024. The default
194 input unit is specified by letter, followed by |UNIT. UNIT rep‐
195 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
196 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
197 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
198 e|E is exabytes. (This should not be confused with the output
199 control --units, where capital letters mean multiple of 1000.)
200
202 See lvm(8) for information about environment variables used by lvm.
203 For example, LVM_VG_NAME can generally be substituted for a required VG
204 parameter.
205
207 Remove an active LV without asking for confirmation.
208 lvremove -f vg00/lvol1
209
210 Remove all LVs the specified VG.
211 lvremove vg00
212
214 lvm(8) lvm.conf(5) lvmconfig(8)
215
216 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
217 pvresize(8) pvs(8) pvscan(8)
218
219 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
220 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
221 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
222 vgs(8) vgscan(8) vgsplit(8)
223
224 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
225 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
226
227 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
228 vate(8) lvmdump(8)
229
230 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
231 busd(8)
232
233 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
234
235
236
237Red Hat, Inc. LVM TOOLS 2.03.02(2)-RHEL8 (2019-01-04) LVREMOVE(8)