Lost my lvm partition
I had an lvm-type partition which had a lot of unallocated space in front of it.
So using fdisk I deleted the partition and recreated it starting from the start of the unallocated space.
It was kind of an experiment to see if I could still use the lvm pv. I had created an mbr backup but was so stupid to put it in my home directory, which is held in the lvm pv.
So now I lost my pv. It's somewhere in between cylinder xx and the end cylinder of my disk. I still have the backup files in /etc/lvm/backup. I tried lots of beginning cylinders (using fdisk, delete part. and recreate starting from cylinder xx) and then recreated the pv and vg using those files. However I can't mount any of the lv's in the restored vg, because the filesystem is corrupt. (The wrong starting cylinder)
Now, is there a way to know where my old lvm partition which held the pv is.
Thx in advance
At this point, probably not.
If you had the fdisk listing before you deleted the partition, you could recreate the partition table so that the pv would be in the right place. Or, if you know how big the deleted partition was, as well as the size of the pv, then you could repartition the disk so that it is back in the same format as before. I've done this when I deleted a partition by accident.
But you need to be sure not to make changes to the drive when the partition table is incorrect. Chances are that after recreating the pv and vg you have overwritten whatever had been on the disk and even if you were able to have the partition table restored exactly as before, the data would be corrupt.
Like you say, this was an experiment. In science, most experiments fail; only a few succeed. :-)
|All times are GMT -5. The time now is 09:00 PM.|