On Thu, 2006-06-29 at 00:05 -0400, Paul wrote:
Can anyone point me in the right direction for correcting errors on an HD when using LVM? I've tried e2fsck and indicates bad block. I've tried with -b 8193, 16384, and 32768 and no good.
What Jason said, essentially. E2fsck on /dev/VolGroup00/LogVol00 or whatever. I have just finished reading about 80% of all I found on the web about it (not lists, but HowTos, man pages, ...) and I feel it has many advantages over the "old way". And I *am* and "old way" myself and, theoretically, don't easily change.
I've found some info about reiserfsck on google, but this utility doesn't seem to be included in Centos4.3. I did find it on my old FC1 box.
Would this even be useful on an ext2/3 partition?
I am thinking now I really should have went with just regular 83 Linux ext3 partitions. Arrgghhh.
And if I want to switch to 83 Linux instead of 8e LVM, whats the best way, or at least a feasible way? I can pop another drive in if I need to move data around, but I don't see how, as I can't mount the LVM partition (hda2).
Save what you can by mounting the *LVM* device, not the underlying physical partition. It sounds as if you *may* be making judgments in ignorance (no slam here, but if you haven't read up on the stuff, you're at a disadvantage, as with anything complex).
There are several options you have, depending on just how bad the hardware check nails you. If the e2fsck on /dev/VolGroup00/LogVol00 (or whatever) manages to get the FS to a coherent state with minimal data loss, you can add a PV (physical volume, could be on the same drive, just different partition or could be new drive) after appropriate setup to the volume group and then use pvmove (after appropriate setup) to move the physical extents from the bad drive to another (although I don't know if I would do that). All or part. That may be all you need to do. But I would not stop there.
If you make a boot and root partition on the new drive, copy /boot and / content, do an appropriate grub install, maybe reset the jumpers on the new drive... and more.
I just finished doing this setup for LVM and now have full boot and run from hda and hdd. I can either change boot drive in BIOS or boot current and edit grub to run off other root FS. With LVM snapshot feature, keeping in sync will be a breeze.
I have scripts I would share, but you must keep in mind this is my first use of LVM and it may not be optimal or even mostly correct. But it is working and I can see great things for my use of LVM.
I'd be glad to share the scripts with the list, if "The List" so desires, or privately. 60KB uncompressed, does almost everything but the grub-install - just haven't automated and tested it - and the needed initrd modification. You won't need that if you just are replacing the drive.
Let me know if you want them.
HTH