I created a Thinpool (LVM-Thin) storage called "vm-data" on the added HDD (/deb/sdb) and used it as an area to store the VM/Guest OS. In terms of device, it will be /dev/sdb2. This is a memo on how to delete it.
operation
Steps in the PVE Management GUI
↑ Select Dataceter in the left pane and select Storage. Selecting Remove opens a Confirm dialog. Then select [Yes] to delete
↑ vm-data has been deleted from the storage pool
At this time, if you check /etc/pve/storage.cfg, you will see that the following registered entry has been deleted.
thinpool vm-data
vgname vm-data
content rootdir,images
nodes pxve
This is not the end. Still needs some manipulation.
Check the status of block devices and volumes
↑ lsblk command. sdb2 is not mounted, but some configuration (volume group?) remains
In this state, fdisk operations to reuse /dev/sdb cannot be performed.
Recheck the mount status
I searched the list of mounted devices for entries related to /dev/sdb2.
I double-checked that there was nothing.
Disabling LVM volumes
Deactivate the logical volume (/dev/vm-data/vm-data) and all logical volumes in the volume group (vm-data).
vgchange -an vm-data
The following message was output.
↑ There are 0 active logical volumes in the volume group vm-data.
↑ Check the block device status again using the lsblk command. /dev/sdb2 and its accompanying LVM are gone, only /dev/sdb
Checking on the PVE management GUI screen
↑ Select the node in the left pane, select Disks, and select Reload. You can also see that /dev/sdb2 is gone.
By performing the operations up to this point, you can now create a new partition in /dev/sdb using the fdisk command