Help deleting lv-thin - illegal characters.

barchetta

New Member
Apr 3, 2022
15
0
1
Im trying to delete an entire disk and wipe it. I have a few lv-thins on it. I figure I should delete those first or I might wind up with orphans? Anyway, I get the same error when I to purge from the UI or try from CLI

proxmox delete lv-thin storage: invalid format - storage ID '4gspin' contains illegal characters

Anyone know how to resolve this?
root@host1:~# pvesm scan lvm
ssd2thpl
ssd1thpl
4gspin
pve
 
Last edited:
First lets check where this could be coming from:
Code:
root@pve7test1:~# grep -R "contains illegal characters" /usr/share/perl5/PVE
/usr/share/perl5/PVE/Storage/Plugin.pm: die "lvm name '$name' contains illegal characters\n";
/usr/share/perl5/PVE/JSONSchema.pm:     die "$type ID '$id' contains illegal characters\n";
/usr/share/perl5/PVE/Storage.pm:    die "VMID '$vmid' contains illegal characters\n" if $vmid !~ m/^\d+$/;
root@pve7test1:~#

now lets look when its being called:
Code:
root@pve7test1:~#  grep -A5 -B5 "contains illegal characters" /usr/share/perl5/PVE/JSONSchema.pm
sub parse_id {
    my ($id, $type, $noerr) = @_;

     if ($id !~ m/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i) {
        return undef if $noerr;
        die "$type ID '$id' contains illegal characters\n";
    }
    return $id;
}
So the ID has to start with something in the range of "a-z"

The error you are getting is about deleting a storage object, not necessary LVM volume, I think.
So you can simply edit /etc/pve/storage.cfg and rename the storage pool. Or remove it completely and finish cleanup using LVM commands.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thank you for your help..

root@host1:~# grep -R "contains illegal characters" /usr/share/perl5/PVE
/usr/share/perl5/PVE/Storage/Plugin.pm: die "lvm name '$name' contains illegal characters\n";
/usr/share/perl5/PVE/Storage.pm: die "VMID '$vmid' contains illegal characters\n" if $vmid !~ m/^\d+$/;
/usr/share/perl5/PVE/JSONSchema.pm: die "$type ID '$id' contains illegal characters\n";
/usr/share/perl5/PVE/Network/SDN/Controllers/Plugin.pm: die "controller ID '$id' contains illegal characters\n";
/usr/share/perl5/PVE/Network/SDN/Zones/Plugin.pm: die "zone ID '$id' contains illegal characters\n";
/usr/share/perl5/PVE/Network/SDN/Dns/Plugin.pm: die "dns ID '$id' contains illegal characters\n";
/usr/share/perl5/PVE/Network/SDN/Ipams/Plugin.pm: die "ipam ID '$id' contains illegal characters\n";
/usr/share/perl5/PVE/Network/SDN/VnetPlugin.pm: die "vnet ID '$id' contains illegal characters\n";

root@host1:~# grep -A5 -B5 "contains illegal characters" /usr/share/perl5/PVE/JSONSchema.pm
sub parse_id {
my ($id, $type, $noerr) = @_;

if ($id !~ m/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i) {
return undef if $noerr;
die "$type ID '$id' contains illegal characters\n";
}
return $id;
}

register_format('pve-vmid', \&pve_verify_vmid);

Is this bad?

I'll try and edit storage.
 
Correct that the VG can't be named starting with a #.
I used the following command to rename the VG first
vgrename [oldname] [newname]

EX:
vgrename 1lvm lvm1

to rename. You may need to go edit the storage.cfg file after the rename.
But I used this to be able to delete the LVM entirely.
 

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 yours easily in our online shop.

Buy now!