Help deleting lv-thin - illegal characters.

barchetta

Member
Apr 3, 2022
15
0
6
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.