Before doing any more damage, make at least one disk image of what you have. If a disk image is a file of a larger drive, you can use loopback to examine it. If you want to make changes, don't use your only copy.
-- Mike hennebry@web.cs.ndsu.NoDak.edu "Horse guts never lie." -- Cherek Bear-Shoulders
I'm not sure how to do that when I can't even mount the disk.
Any suggestions on what to do next?
I've noticed that lvm archives a volume group configuration when a change is made to it (under /etc/lvm/archive.. In plain text too!) By looking at these I can tell exactly what commands I ran in order to muck things up...
Fri Sep 21 17:56:48 2007: 'vgextend VolGroup00 /dev/sdb2' Fri Sep 21 18:25:40 2007: 'vgreduce VolGroup00 /dev/sdb2' Fri Sep 21 18:25:45 2007: 'vgcreate VolGroup01 /dev/sdb2' Mon Sep 24 18:37:52 2007: 'vgremove VolGroup01' Tue Sep 25 13:51:10 2007: 'vgcreate VolGroup01 /dev/sdb2'
I can also tell what pv's and lv's belonged to the corresponding VolGroup in each archive.
(btw, I've seen archived threads from what looks to be an old linux-lvm specific mailing list. Anyone know if this still exists? I can't find it anywhere)
Somebody in the thread at some point said:
Before doing any more damage, make at least one disk image of what you have. If a disk image is a file of a larger drive, you can use loopback to examine it. If you want to make changes, don't use your only copy.
-- Mike hennebry@web.cs.ndsu.NoDak.edu "Horse guts never lie." -- Cherek Bear-Shoulders
I'm not sure how to do that when I can't even mount the disk.
you can use, eg,
dd if=/dev/sda1 of=/home/fred/sda1-image
to get a bit-for-bit copy of the /dev/sda1 partition as a file on some other filesystem... only do it when the filesystem being copied is unmounted. If you don't have recent backups of the important content, that was great advice to rip a copy of your partition(s) before you meddle.
Any suggestions on what to do next?
I think job #1 is to start hating on LVM. I didn't really understand what you have done to your system and if you took a dump on the ext3 filesystem inside the LVM wrapper or not, or if you merely trashed the LVM metadata. But either way at this bad moment you are in poorly charted territory and not much help is forthcoming if my experience was any guide. That's *exactly* the situation you *don't* want your *data* of all things to be in. I took from this that LVM is just a bomb waiting to go off and have removed it from all my boxes, and periodically rant here to a perfect disinterest from anyone capable to change it that LVM should NOT be on by default for installs.
I documented here:
http://www.redhat.com/archives/fedora-list/2006-June/msg03297.html
how I recovered an ext3 filesystem from a trashed LVM partition, it's not trivial but it worked. If you have backups, you should instead give up and repartition and reformat your drive plain ext3 (if you are in the mood for taking advice, partition as a single / partition and maybe a little one for /boot first).
-Andy
On Wed, 3 Oct 2007, Andrew Stewart wrote:
Before doing any more damage, make at least one disk image of what you have. If a disk image is a file of a larger drive, you can use loopback to examine it. If you want to make changes, don't use your only copy.
I'm not sure how to do that when I can't even mount the disk.
You shouldn't mount the disk. The command is something like cp /dev/sda /this/file/will/be/big Note that sda does not end in a digit. It refers to the entire drive, not any particular partition. You might need hdb or something instead of sda, depending on the drive and its place in the pecking order. The copy will take a while. dd, with a different syntax, will work also.
On Wed, Oct 3, 2007 at 7:01 PM, Andrew Stewart stewarta@nmrc.navy.mil wrote:
(btw, I've seen archived threads from what looks to be an old linux-lvm specific mailing list. Anyone know if this still exists? I can't find it anywhere)
I've been chasing an LVM problem myself and ran across that list:
https://www.redhat.com/mailman/listinfo/linux-lvm
As as aside, my problem resulted from something that wasn't clear in the F7 install. I had a system get hosed due to a memory problem and reinstalled F7 because I had a dvd handy. I was intent on installing F8 so I created a partition to use to do a hard disk install of F8. I realized, after the fact, that the partition I created was a logical partition, which cannot be used for the hard disk install. Lots of time wasted because the installer used the entire disk (except for /boot) for LVM, grumble.
On a more positive note, readlist.com has a nice interface for browsing through list archives: http://readlist.com/lists/redhat.com/linux-lvm/
Cheers,
Mike