[SOLVED] Accidentally deleted Volume Group. Need Help readding it

RTA

New Member
Oct 20, 2023
6
0
1
Hello all, Dumb here! ;)

Long story short, I have added a new SSD as a LVM, but I wanted to create a LVM-Thin instead.

So, I migrated all my VM disks to another storage LVM, wiped the disk and created a LVM-Thin.

After that, I migrated all my VMs back into the new SSD.

Then, comes the GENIUS part... :mad: (I did not make screen captures)...

I have noticed that the LVM that I have created before wiping the disk was still showing (Greyed out and with a question mark). So, as smart as I could be at midnight, after working all day long, I went and deleted it from the Node > Disks > LVM... and.. Yes, the whole disk.

But as I already could smell the Sh** I was doing. I deselect the options to delete the disk content:

Screenshot from 2023-10-20 13-55-47.pngExample from the remaining LVM

So, I hope I still have my files there.

Sooooo. That also removed the LVM-Thin.

Is there any way to recreate the VG and reconnect the disk?

Here are the results of the command pvscan, and the attempt to list the LVs:

Screenshot from 2023-10-20 15-24-52.png

I am obviously a noobie and a careless one. Any help will be greatly appreciated.
 
Last edited:
I am searching for a solution and vgcreate seems to recreate the Volume Group, but I am afraid to use it and lose the disk contents.
 
Surprisingly, I seem to have found a backup? I don't understand properly, I was reading vgcreate documentation and then vgcfgrestore documentation.... does it mean I just need to restore this file?
Screenshot from 2023-10-20 15-14-26.png
 
While I cant advise on what you should do here, as I never needed such procedure and would just google same as you, I can tell you what I would do in your shoes:
- make sure you dont accidentally write to any disk that you want to recover, shutdown the host if necessary
- install a VM anywhere outside of your infrastructure, ie laptop, aws, anywhere. Feed it a few virtual disks. Create a matching LVM structure and write some verifiable data. You can use fio.
- repeat the steps you did to delete the structure
- follow whatever guide you find to restore access and re-verify that data is there
- with those steps under your belt now you can do the same on your important data

I feel like this would be much more valuable for your confidence than another internet stranger's validation.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: RTA
While I cant advise on what you should do here, as I never needed such procedure and would just google same as you, I can tell you what I would do in your shoes:
- make sure you dont accidentally write to any disk that you want to recover, shutdown the host if necessary
- install a VM anywhere outside of your infrastructure, ie laptop, aws, anywhere. Feed it a few virtual disks. Create a matching LVM structure and write some verifiable data. You can use fio.
- repeat the steps you did to delete the structure
- follow whatever guide you find to restore access and re-verify that data is there
- with those steps under your belt now you can do the same on your important data

I feel like this would be much more valuable for your confidence than another internet stranger's validation.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Thanks, @bbgeek17, that is a very sensate advise that I had not thought about, I think my weekend is fully booked now. :cool:
 
ITS ALIVE!!!

@bbgeek17 I have to begin by saying, It is not a production environment, it is a personal lab machine, so I made a coin toss... it was my data on one side and my weekend on the other.

The article that helped me to understand it better was this one:
https://www.golinuxcloud.com/vgcfgrestore-recover-lvm-without-backup/

These provided me the solid grounds:
https://linux.die.net/man/8/vgcreate
https://linux.die.net/man/8/vgcfgrestore

1697834351114.png

1697834606414.png

Restored to its former glory.

But still, @bbgeek17 's advice is the most sane I have heard in communities for a while.

Thanks.
 
Last edited:

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!