logical Volume delete

Antonino89

Member
Jul 13, 2017
76
1
6
35
Hi team,

can someone explain how can i list logical volume on a server?

i need to delete an old one.

Thanks

Task viewer: CT 103 - Migrate

OutputStatus

Stop
2017-09-13 10:52:09 shutdown CT 103
2017-09-13 10:52:09 # lxc-stop -n 103 --timeout 180
2017-09-13 10:52:12 # lxc-wait -n 103 -t 5 -s STOPPED
2017-09-13 10:52:13 starting migration of CT 103 to node 'Server2' (192.168.100.12)
2017-09-13 10:52:13 found local volume 'LVM1:vm-103-disk-1' (in current VM config)
volume lvm11/vm-103-disk-1 already exists
command 'dd 'if=/dev/lvm11/vm-103-disk-1' 'bs=64k'' failed: got signal 13
send/receive failed, cleaning up snapshot(s)..
2017-09-13 10:52:14 ERROR: command 'set -o pipefail && pvesm export LVM1:vm-103-disk-1 raw+size - -with-snapshots 0 | /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=Server2' root@192.168.100.12 -- pvesm import LVM1:vm-103-disk-1 raw+size - -with-snapshots 0' failed: exit code 255
2017-09-13 10:52:14 aborting phase 1 - cleanup resources
2017-09-13 10:52:14 ERROR: found stale volume copy 'LVM1:vm-103-disk-1' on node 'Server2'
2017-09-13 10:52:14 start final cleanup
2017-09-13 10:52:14 start container on target node
2017-09-13 10:52:14 # /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=Server2' root@192.168.100.12 pct start 103
2017-09-13 10:52:15 Configuration file 'nodes/Server2/lxc/103.conf' does not exist
2017-09-13 10:52:15 ERROR: command '/usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=Server2' root@192.168.100.12 pct start 103' failed: exit code 255
2017-09-13 10:52:15 ERROR: migration aborted (duration 00:00:06): command 'set -o pipefail && pvesm export LVM1:vm-103-disk-1 raw+size - -with-snapshots 0 | /usr/bin/ssh -o 'BatchMode=yes' -o 'HostKeyAlias=Server2' root@192.168.100.12 -- pvesm import LVM1:vm-103-disk-1 raw+size - -with-snapshots 0' failed: exit code 255
TASK ERROR: migration aborted
 
root@Server2:/etc/pve/lxc# pvesm list LVM1
LVM1:vm-103-disk-1 raw 10737418240 103

root@Server2:/etc/pve/lxc# pvesm remove vm-103-disk-1
delete storage failed: storage 'vm-103-disk-1' does not exist


uhmmmm....
 
delete storage failed: storage 'vm-103-disk-1' does not exist
please read the error closely:
'delete storage failed' means you tried to delete a storage configuration not an image in a storage

the correct command you seek is:
Code:
pvesm free <volume>

for more details see:
Code:
man pvesm

as for your initial question, you can list logical volumes with
Code:
lvs
 
Even pvesm free doesn't work...

root@Server2:~# pvesm free vm-103-disk-1
400 Parameter verification failed.
volume: no storage speficied - incomplete volume ID
pvesm free <volume> [OPTIONS]

root@Server2:~# pvesm free lvm11
400 Parameter verification failed.
volume: no storage speficied - incomplete volume ID
pvesm free <volume> [OPTIONS]

root@Server2:~# pvesm free 103
400 Parameter verification failed.
volume: no storage speficied - incomplete volume ID
pvesm free <volume> [OPTIONS]


i need to delete vm-103-disk-1
 
root@Server2:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
vm-100-disk-1 lvm11 -wi-ao---- 10.00g
vm-103-disk-1 lvm11 -wi-a----- 10.00g
 
Even pvesm free doesn't work...

root@Server2:~# pvesm free vm-103-disk-1
400 Parameter verification failed.
volume: no storage speficied - incomplete volume ID
pvesm free <volume> [OPTIONS]

root@Server2:~# pvesm free lvm11
400 Parameter verification failed.
volume: no storage speficied - incomplete volume ID
pvesm free <volume> [OPTIONS]

root@Server2:~# pvesm free 103
400 Parameter verification failed.
volume: no storage speficied - incomplete volume ID
pvesm free <volume> [OPTIONS]


i need to delete vm-103-disk-1
pvesm free needs the "storage:volume" syntax like it displays in the list output

so
Code:
pvesm free LVM1:vm-103-disk-1

edit:
corrected the commandline (copy/paste error)
 

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!