[CentOS] LVM repairing or back to regular ext3?

Paul unix at bikesn4x4s.com
Thu Jun 29 21:44:13 UTC 2006


On Thu, June 29, 2006 7:27 am, William L. Maltby wrote:
> 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).

Yea, probably more like learning curve.  Sometimes I get frustrated then
soon after all my over-excitement, I catch on and it's easy after that.

> 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.

Thanks for all the info.  I'm going to practice up on LVM on my test box. 
I am totally clueless on it.  I am curious if I can change volume size on
the fly, now that would be of use.

What's funny is that after I was doing all the trouble shooting on it last
night, now it's fine, no more crc errors.  So I am thinking that the
currupt data was on boot slice.  But I still gotta know how to work with
LVM.

And yes, send me your scripts.  I like studying various code.  I'm always
learning.  Thanks!

-- 

^^^^^^^^^^^^| || \
| Budvar    ######|| ||'|"\,__.
| _..._...______ ===|=||_|__|...]
"(@)'(@)""""**|(@)(@)*****(@)I





More information about the CentOS mailing list