For some reasons my LVM storage was not related to the ISCSI connection in my qnap server.
So, from the web interface I deleted the LVM and ISCSI storage.
Then I recreated the ISCSI connection but when I try to recreate the LVM connection I had this error:
So I deleted volume group mydatavm:
and
Now I recreate the ISCSI and LVM storage and all work fine.
But now I don't see my old VM disc in LVM. How can I restore them?
So, from the web interface I deleted the LVM and ISCSI storage.
Then I recreated the ISCSI connection but when I try to recreate the LVM connection I had this error:
Code:
create storage failed: device '/dev/disk/by-id/scsi-36e843b689869ccbd2947d4833db6fcdc' is already used by volume group 'mydatavm' (500)
So I deleted volume group mydatavm:
Code:
# lvremove vgremove pvremove
vgremove mydatavm
Do you really want to remove volume group "mydatavm" containing 6 logical volumes? [y/n]: y
Do you really want to remove and DISCARD logical volume vm-106-disk-1? [y/n]: y
Logical volume "vm-106-disk-1" successfully removed
Do you really want to remove and DISCARD logical volume vm-107-disk-1? [y/n]: y
Logical volume "vm-107-disk-1" successfully removed
Do you really want to remove and DISCARD logical volume vm-100-disk-1? [y/n]: y
Logical volume "vm-100-disk-1" successfully removed
Do you really want to remove and DISCARD logical volume vm-101-disk-1? [y/n]: y
Logical volume "vm-101-disk-1" successfully removed
Do you really want to remove and DISCARD logical volume vm-105-disk-1? [y/n]: y
Logical volume "vm-105-disk-1" successfully removed
Do you really want to remove and DISCARD logical volume vm-102-disk-1? [y/n]: y
Logical volume "vm-102-disk-1" successfully removed
Volume group "mydatavm" successfully removed
and
Code:
pvremove /dev/sdb
Now I recreate the ISCSI and LVM storage and all work fine.
But now I don't see my old VM disc in LVM. How can I restore them?