Everything I know how to do would have happened BEFORE the issue. Backup of the data. Backups of the storage configuration. Working after the fact is hard.
Did you happen to try parted's rescue mode? From the parted manpage:
Code:
rescue start end
Rescue a lost partition that was located somewhere
between start and end. If a partition is found, parted
will ask if you want to create an entry for it in the
partition table.
I've never used it.
Nobody knows "any other way", so nobody can make claims about that, but they might know 1 method. Heck, you can always go in with a hex editor and manually setup everything. I can't, but perhaps you could? That would be "any other way" to fix it too.
You've already broken the 1st rule of data recovery - never touch the original storage. The first step, always, is to clone all the bit to other storage and never touch the original.
Imagine you'd done this BEFORE it was needed:
Code:
sudo parted -lm | tee /root/partition-table-backups
How tiny is that file? It would have been easy to backup with your other data, right? It can be used to exactly recreate a partition table. Handy, right?
You mention vgcfgbackup vgcfgrestore. Those are for LVM. Yet, no other mention LVM? Was LVM being used or not? LVM tools aren't exactly useful if LVM isn't being used. However, if LVM is being used, then /etc/lvm/backup/ is where that data is placed. Do you have access to it? I include /etc/ in all my backups. It is tiny, just 33MB. Most of the data/configs in /etc/ aren't needed during a fresh install, but having it for reference is always helpful, I've found. Actually, I just keep these:
Code:
sudo pvs | tee /root/pvs.stuff
sudo vgs | tee /root/vgs.stuff
sudo lvs | tee /root/lvs.stuff
lsblk -o name,size,type,fstype,mountpoint | tee /root/lsblk.stuff
to capture LVM overview information. Include it in your backups, so it is available, later, when needed.
All this has to be done BEFORE it is needed. Sorry.
Bookmarks