On Mon, 16 May 2005 11:07:29 -0700, Eric Thelin wrote: > You got lucky. According to all info I found and my own attempts to > recover if a drive fails completely all LVM tools will give up because > the volume can't be accessed and therefore can't be operated on. If > you were able to get LVM to remove the drive that is dead you would > then have the problem of XFS not being able to shrink only grow. So > you cannot remove the dead drive. From what I read when I installed > LVM I thought this would work but when push came to shove I found out > that LVM can remove a "failing" disk but if your disk just completely > fails your complete array is toast.
vgchange -a y -P That should do exactly what you want. 'vgchange -a y' is what the boot scripts use to bring up the lvm (it's often done in the initrd). All you need to add is -P or --partial, which will allow it to bring up a partial lvm - ie. where one or more disks are missing. I used it a while ago when I had taken a disk out of a machine temporarily. Did just what it said on the tin - the machine came up, all the logical volumes were there except for the ones entirely on that drive. Any incomplete filesystems get 0's so you want to mount those readonly and get the data off. What freaked me out was when I put the disk back in (as I said, the disk was fine, just not in the machine for a while). Next boot it refused to see it as part of the volume group. Took me a while to work out that the 'vgchange -a y -P' permanently removes the disk from the vg; thought I'd lost all the data. Bit more reading and vgcfgrestore came to the rescue. Turns out lvm backs up the metadata on every change and you can restore it back to any point (usually stored in /etc/lvm). Restore the last version, everything was perfect again. Phew. ;) Cheers, Martin. _______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
