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           [    --profile String ]
64           [    --version ]
65

OPTIONS

67       -A|--autobackup y|n
68              Specifies if metadata should be backed up automatically after a
69              change.  Enabling this is strongly advised! See vgcfgbackup(8)
70              for more information.
71
72       --commandprofile String
73              The command profile to use for command configuration.  See
74              lvm.conf(5) for more information about profiles.
75
76       --config String
77              Config settings for the command. These override lvm.conf set‐
78              tings.  The String arg uses the same format as lvm.conf, or may
79              use section/field syntax.  See lvm.conf(5) for more information
80              about config.
81
82       -d|--debug ...
83              Set debug level. Repeat from 1 to 6 times to increase the detail
84              of messages sent to the log file and/or syslog (if configured).
85
86       --driverloaded y|n
87              If set to no, the command will not attempt to use device-mapper.
88              For testing and debugging.
89
90       -f|--force ...
91              Override various checks, confirmations and protections.  Use
92              with extreme caution.
93
94       -h|--help
95              Display help text.
96
97       --lockopt String
98              Used to pass options for special cases to lvmlockd.  See lvm‐
99              lockd(8) for more information.
100
101       --longhelp
102              Display long help text.
103
104       --nohistory
105              Do not record history of LVs being removed.  This has no effect
106              unless the configuration setting metadata/record_lvs_history is
107              enabled.
108
109       --noudevsync
110              Disables udev synchronisation. The process will not wait for
111              notification from udev. It will continue irrespective of any
112              possible udev processing in the background. Only use this if
113              udev is not running or has rules that ignore the devices LVM
114              creates.
115
116       --profile String
117              An alias for --commandprofile or --metadataprofile, depending on
118              the command.
119
120       -q|--quiet ...
121              Suppress output and log messages. Overrides --debug and --ver‐
122              bose.  Repeat once to also suppress any prompts with answer
123              'no'.
124
125       --reportformat basic|json
126              Overrides current output format for reports which is defined
127              globally by the report/output_format setting in lvm.conf.  basic
128              is the original format with columns and rows.  If there is more
129              than one report per command, each report is prefixed with the
130              report name for identification. json produces report output in
131              JSON format. See lvmreport(7) for more information.
132
133       -S|--select String
134              Select objects for processing and reporting based on specified
135              criteria.  The criteria syntax is described by --select help and
136              lvmreport(7).  For reporting commands, one row is displayed for
137              each object matching the criteria.  See --options help for
138              selectable object fields.  Rows can be displayed with an addi‐
139              tional "selected" field (-o selected) showing 1 if the row
140              matches the selection and 0 otherwise.  For non-reporting com‐
141              mands which process LVM entities, the selection is used to
142              choose items to process.
143
144       -t|--test
145              Run in test mode. Commands will not update metadata.  This is
146              implemented by disabling all metadata writing but nevertheless
147              returning success to the calling function. This may lead to
148              unusual error messages in multi-stage operations if a tool
149              relies on reading back metadata it believes has changed but
150              hasn't.
151
152       -v|--verbose ...
153              Set verbose level. Repeat from 1 to 4 times to increase the
154              detail of messages sent to stdout and stderr.
155
156       --version
157              Display version information.
158
159       -y|--yes
160              Do not prompt for confirmation interactively but always assume
161              the answer yes. Use with extreme caution.  (For automatic no,
162              see -qq.)
163

VARIABLES

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

ENVIRONMENT VARIABLES

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

EXAMPLES

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

SEE ALSO

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