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|json_std ]
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           [    --devices PV ]
61           [    --devicesfile String ]
62           [    --driverloaded y|n ]
63           [    --journal String ]
64           [    --lockopt String ]
65           [    --longhelp ]
66           [    --nohints ]
67           [    --nolocking ]
68           [    --profile String ]
69           [    --version ]
70

OPTIONS

72       -A|--autobackup y|n
73              Specifies  if metadata should be backed up automatically after a
74              change.  Enabling this is strongly advised!  See  vgcfgbackup(8)
75              for more information.
76
77       --commandprofile String
78              The  command  profile  to  use  for  command configuration.  See
79              lvm.conf(5) for more information about profiles.
80
81       --config String
82              Config settings for the command. These override lvm.conf(5) set‐
83              tings.   The  String arg uses the same format as lvm.conf(5), or
84              may use section/field syntax.  See lvm.conf(5) for more informa‐
85              tion about config.
86
87       -d|--debug ...
88              Set debug level. Repeat from 1 to 6 times to increase the detail
89              of messages sent to the log file and/or syslog (if configured).
90
91       --devices PV
92              Restricts the devices that are visible  and  accessible  to  the
93              command.  Devices not listed will appear to be missing. This op‐
94              tion can be repeated, or accepts a comma separated list  of  de‐
95              vices. This overrides the devices file.
96
97       --devicesfile String
98              A file listing devices that LVM should use.  The file must exist
99              in /etc/lvm/devices/ and is managed with the lvmdevices(8)  com‐
100              mand.   This  overrides  the lvm.conf(5) devices/devicesfile and
101              devices/use_devicesfile settings.
102
103       --driverloaded y|n
104              If set to no, the command will not attempt to use device-mapper.
105              For testing and debugging.
106
107       -f|--force ...
108              Override  various  checks,  confirmations  and protections.  Use
109              with extreme caution.
110
111       -h|--help
112              Display help text.
113
114       --journal String
115              Record information in the systemd journal.  This information  is
116              in  addition  to information enabled by the lvm.conf log/journal
117              setting.  command: record information about the  command.   out‐
118              put: record the default command output.  debug: record full com‐
119              mand debugging.
120
121       --lockopt String
122              Used to pass options for special cases to  lvmlockd.   See  lvm‐
123              lockd(8) for more information.
124
125       --longhelp
126              Display long help text.
127
128       --nohints
129              Do  not  use the hints file to locate devices for PVs. A command
130              may read more devices to find PVs when hints are not  used.  The
131              command will still perform standard hint file invalidation where
132              appropriate.
133
134       --nohistory
135              Do not record history of LVs being removed.  This has no  effect
136              unless  the configuration setting metadata/record_lvs_history is
137              enabled.
138
139       --nolocking
140              Disable locking. Use with caution, concurrent commands may  pro‐
141              duce incorrect results.
142
143       --noudevsync
144              Disables udev synchronization. The process will not wait for no‐
145              tification from udev. It will continue irrespective of any  pos‐
146              sible  udev  processing in the background. Only use this if udev
147              is not running or has rules that ignore the devices LVM creates.
148
149       --profile String
150              An alias for --commandprofile or --metadataprofile, depending on
151              the command.
152
153       -q|--quiet ...
154              Suppress  output  and log messages. Overrides --debug and --ver‐
155              bose.  Repeat once to also  suppress  any  prompts  with  answer
156              'no'.
157
158       --reportformat basic|json|json_std
159              Overrides  current  output  format  for reports which is defined
160              globally by the  report/output_format  setting  in  lvm.conf(5).
161              basic is the original format with columns and rows.  If there is
162              more than one report per command, each report is  prefixed  with
163              the  report name for identification. json produces report output
164              in JSON format. json_std produces report output in  JSON  format
165              which  is  more  compliant with JSON standard.  See lvmreport(7)
166              for more information.
167
168       -S|--select String
169              Select objects for processing and reporting based  on  specified
170              criteria.  The criteria syntax is described by --select help and
171              lvmreport(7).  For reporting commands, one row is displayed  for
172              each  object  matching the criteria.  See --options help for se‐
173              lectable object fields.  Rows can be  displayed  with  an  addi‐
174              tional  "selected"  field  (-o  selected)  showing  1 if the row
175              matches the selection and 0 otherwise.  For  non-reporting  com‐
176              mands  which  process  LVM  entities,  the  selection is used to
177              choose items to process.
178
179       -t|--test
180              Run in test mode. Commands will not update  metadata.   This  is
181              implemented  by  disabling all metadata writing but nevertheless
182              returning success to the calling function. This may lead to  un‐
183              usual  error messages in multi-stage operations if a tool relies
184              on reading back metadata it believes has changed but hasn't.
185
186       -v|--verbose ...
187              Set verbose level. Repeat from 1 to 4 times to increase the  de‐
188              tail of messages sent to stdout and stderr.
189
190       --version
191              Display version information.
192
193       -y|--yes
194              Do  not  prompt for confirmation interactively but always assume
195              the answer yes. Use with extreme caution.   (For  automatic  no,
196              see -qq.)
197

VARIABLES

199       VG     Volume Group name.  See lvm(8) for valid names.
200
201       LV     Logical  Volume  name.  See lvm(8) for valid names.  An LV posi‐
202              tional arg generally includes the VG  name  and  LV  name,  e.g.
203              VG/LV.
204
205       Tag    Tag  name.  See lvm(8) for information about tag names and using
206              tags in place of a VG, LV or PV.
207
208       Select Select indicates that a required  positional  parameter  can  be
209              omitted  if the --select option is used.  No arg appears in this
210              position.
211
212       String See the option description for information about the string con‐
213              tent.
214
215       Size[UNIT]
216              Size  is  an  input number that accepts an optional unit.  Input
217              units are always treated as base two values, regardless of capi‐
218              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
219              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
220              resents other possible input units: b|B is bytes, s|S is sectors
221              of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB,  t|T  is  TiB,
222              p|P  is  PiB, e|E is EiB.  (This should not be confused with the
223              output control --units, where capital letters mean  multiple  of
224              1000.)
225

ENVIRONMENT VARIABLES

227       See  lvm(8)  for  information  about environment variables used by lvm.
228       For example, LVM_VG_NAME can generally be substituted for a required VG
229       parameter.
230

EXAMPLES

232       Remove an active LV without asking for confirmation.
233       lvremove -f vg00/lvol1
234
235       Remove all LVs the specified VG.
236       lvremove vg00
237

SEE ALSO

239       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
240
241       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
242       pvremove(8), pvresize(8), pvs(8), pvscan(8),
243
244       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
245       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
246       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
247       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
248
249       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
250       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
251
252       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
253
254       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
255       lvmdbusd(8), fsadm(8),
256
257       lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7),
258       lvmvdo(7), lvmautoactivation(7)
259
260
261
262
263Red Hat, Inc.          LVM TOOLS 2.03.22(2) (2023-08-02)           LVREMOVE(8)
Impressum