Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Our system has deleted one VHD-* volume from our VG, and unfortunately this VM (we run XenServer) wasn't on our backup routine yet.
I was able to recover a lot of data using PhotoRec, however I don't have the .MYD that stores the MySQL data, which was the most important data.
There's any way to recover this LVM partition, or the data inside? I tried extgrep, but it only worked with the non-LVM partition, I wasn't able to use in the LVM partition (always said that superblock magic number is invalid, etc..).
As long as you have made no other changes to that VG, you can look in directory /etc/lvm/backup for the file that was saved just before that volume was deleted (look at the "description = ..." lines near the top of each file), and then use vgcfgrestore with the "--file" option to restore that VG's configuration back to the way it was. If that VG is still in use and there were subsequent changes to its configuration, you have to be very careful or you risk damage to its current contents.
As long as you have made no other changes to that VG, you can look in directory /etc/lvm/backup for the file that was saved just before that volume was deleted (look at the "description = ..." lines near the top of each file), and then use vgcfgrestore with the "--file" option to restore that VG's configuration back to the way it was. If that VG is still in use and there were subsequent changes to its configuration, you have to be very careful or you risk damage to its current contents.
Hi!
Unfortunately, just after the vm deletion, has been created a new disk in the same 'pv0' stripe.
Unfortunately, just after the vm deletion, has been created a new disk in the same 'pv0' stripe.
Then there is probably not much you can do beyond what photorec has already recovered. Reformatting with the same type of filesystem that was there before ensures that all of the previous filesystem metadata is overwritten. If all that was done was making a new PV and LV (i.e., no mkfs), then the old filesystem would still be there, perhaps not aligned at the start of the new LV, but still there. Which was it?
Then there is probably not much you can do beyond what photorec has already recovered. Reformatting with the same type of filesystem that was there before ensures that all of the previous filesystem metadata is overwritten. If all that was done was making a new PV and LV (i.e., no mkfs), then the old filesystem would still be there, perhaps not aligned at the start of the new LV, but still there. Which was it?
Hi,
We had a CentOS installations, só probably was another lvm with ext3 inside!
Also, the new LV it's smaller than the old, and contain no data inside (was just a new virtual disk created on the server, but never used).
Thanks
Last edited by rodrigo.baldasso; 11-09-2014 at 12:15 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.