1LVREMOVE(8)                 System Manager's Manual                LVREMOVE(8)
2
3
4

NAME

6       lvremove - Remove logical volume(s) from the system
7

SYNOPSIS

9       lvremove position_args
10           [ option_args ]
11

DESCRIPTION

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

USAGE

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

OPTIONS

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 no‐
115              tification from udev. It will continue irrespective of any pos‐
116              sible udev processing in the background. Only use this if udev
117              is not running or has rules that ignore the devices LVM creates.
118
119       --profile String
120              An alias for --commandprofile or --metadataprofile, depending on
121              the command.
122
123       -q|--quiet ...
124              Suppress output and log messages. Overrides --debug and --ver‐
125              bose.  Repeat once to also suppress any prompts with answer
126              'no'.
127
128       --reportformat basic|json
129              Overrides current output format for reports which is defined
130              globally by the report/output_format setting in lvm.conf.  basic
131              is the original format with columns and rows.  If there is more
132              than one report per command, each report is prefixed with the
133              report name for identification. json produces report output in
134              JSON format. See lvmreport(7) for more information.
135
136       -S|--select String
137              Select objects for processing and reporting based on specified
138              criteria.  The criteria syntax is described by --select help and
139              lvmreport(7).  For reporting commands, one row is displayed for
140              each object matching the criteria.  See --options help for se‐
141              lectable object fields.  Rows can be displayed with an addi‐
142              tional "selected" field (-o selected) showing 1 if the row
143              matches the selection and 0 otherwise.  For non-reporting com‐
144              mands which process LVM entities, the selection is used to
145              choose items to process.
146
147       -t|--test
148              Run in test mode. Commands will not update metadata.  This is
149              implemented by disabling all metadata writing but nevertheless
150              returning success to the calling function. This may lead to un‐
151              usual error messages in multi-stage operations if a tool relies
152              on reading back metadata it believes has changed but hasn't.
153
154       -v|--verbose ...
155              Set verbose level. Repeat from 1 to 4 times to increase the de‐
156              tail of messages sent to stdout and stderr.
157
158       --version
159              Display version information.
160
161       -y|--yes
162              Do not prompt for confirmation interactively but always assume
163              the answer yes. Use with extreme caution.  (For automatic no,
164              see -qq.)
165

VARIABLES

167       VG
168              Volume Group name.  See lvm(8) for valid names.
169
170       LV
171              Logical  Volume  name.  See lvm(8) for valid names.  An LV posi‐
172              tional arg generally includes the VG  name  and  LV  name,  e.g.
173              VG/LV.
174
175       Tag
176              Tag  name.  See lvm(8) for information about tag names and using
177              tags in place of a VG, LV or PV.
178
179       Select
180              Select indicates that a required  positional  parameter  can  be
181              omitted  if the --select option is used.  No arg appears in this
182              position.
183
184       String
185              See the option description for information about the string con‐
186              tent.
187
188       Size[UNIT]
189              Size  is  an  input number that accepts an optional unit.  Input
190              units are always treated as base two values, regardless of capi‐
191              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
192              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
193              resents  other  possible  input units: bBsSkKmMgGtTpPeE.  b|B is
194              bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB,  g|G
195              is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be
196              confused with the output control --units, where capital  letters
197              mean multiple of 1000.)
198

ENVIRONMENT VARIABLES

200       See  lvm(8)  for  information  about environment variables used by lvm.
201       For example, LVM_VG_NAME can generally be substituted for a required VG
202       parameter.
203

EXAMPLES

205       Remove an active LV without asking for confirmation.
206       lvremove -f vg00/lvol1
207
208       Remove all LVs the specified VG.
209       lvremove vg00
210

SEE ALSO

212       lvm(8) lvm.conf(5) lvmconfig(8)
213
214       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
215       pvresize(8) pvs(8) pvscan(8)
216
217       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
218       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
219       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
220       vgs(8) vgscan(8) vgsplit(8)
221
222       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
223       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
224
225       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
226       vate(8) lvmdump(8)
227
228       dmeventd(8)  lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8) lvmd‐
229       busd(8)
230
231       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
232
233
234
235Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)           LVREMOVE(8)
Impressum