How do I delete an LVM configuration (not just remove the storage)?

Spacedumps

New Member
Jan 6, 2019
2
1
1
58
Hi there, ProxMox newbie here. This is probably a dumb question but after re-reading the Storage wiki pages three times and numerous searches of these forums I still seem to be at a standstill.

So here's the situation: I installed ProxMox this afternoon onto two drives (ZFS mirror, /dev/sda and /dev/sdb). No issues with the installation. Next I inserted two more drives (/dev/sdc and /dev/sdd) into my box, and tried creating some temporary LVMs on them, just for the sake of familiarizing myself with the software.

The first LVM, called "blah1", I created on /dev/sdc using the GUI: Node > Disks > LVM > Create Volume Group

The second LVM, called "blah2", I created on /dev/sdd in the shell, via: pvesm add lvm blah2 --vgname blah2vgxx

So far so good:

root@typhon:~# pvesm status
Name Type Status Total Used Available %
blah1 lvm inactive 0 0 0 0.00%
blah2 lvm inactive 0 0 0 0.00%
local dir active 1885338368 910848 1884427520 0.05%
local-zfs zfspool active 1884427692 96 1884427596 0.00%

px1.png


Then I go to remove the LVMs:

root@typhon:~# pvesm remove blah1
root@typhon:~# pvesm remove blah2
root@typhon:~#
root@typhon:~# pvesm scan lvm
blah1
root@typhon:~#
root@typhon:~# pvesm status
Name Type Status Total Used Available %
local dir active 1885338368 910848 1884427520 0.05%
local-zfs zfspool active 1884427680 96 1884427584 0.00%


Both storages are gone, but "blah1" is still listed in the LVM list, and still showing in the LVM page in the GUI.

px2.png

So how do I get rid of the "blah1" LVM fully? Is this what pvesm free is for? If so, how do I determine the VOLUME_ID to use?


Here's my storage.cfg file currently, just showing the zfs pool for the installation disks and nothing from /dev/sdc or /dev/sdd:

root@typhon:~# cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content backup,iso,vztmpl

zfspool: local-zfs
pool rpool/data
content images,rootdir
sparse 1
Thanks for your help!
 

wolfgang

Proxmox Staff Member
Staff member
Oct 1, 2014
6,496
474
103
Hi,

if you like to remove the LVM then you must do this with the lvm tools.
Like 'lvremove'.

and still showing in the LVM page in the GUI.
Reload the page then it should be gone.
 
  • Like
Reactions: Scumlord

wolfgang

Proxmox Staff Member
Staff member
Oct 1, 2014
6,496
474
103
Might I recommend the lvremove command be added to the Storage page of the wiki for the next newbie that come along?
This is not so easy because it depends on the underlying storage.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!