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. 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. 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). -- ^^^^^^^^^^^^| || \ | Budvar ######|| ||'|"\,__. | _..._...______ ===|=||_|__|...] "(@)'(@)""""**|(@)(@)*****(@)I
Oh, and the errors I am getting in /var/log/messages are: kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error } kernel: hda: dma_intr: error=0x84 { DriveStatusError BadCRC } On Thu, June 29, 2006 12:05 am, 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. > > 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. > > 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). > > > -- > > ^^^^^^^^^^^^| || \ > | Budvar ######|| ||'|"\,__. > | _..._...______ ===|=||_|__|...] > "(@)'(@)""""**|(@)(@)*****(@)I > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- ^^^^^^^^^^^^| || \ | Budvar ######|| ||'|"\,__. | _..._...______ ===|=||_|__|...] "(@)'(@)""""**|(@)(@)*****(@)I
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. > > 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. > > 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). >As the previous poster advised, this is probably a hardware fault but for your reference I used the same instructions from this post to fix a corrupt filesystem within LVM. http://dcs.nac.uci.edu/~strombrg/EXT3-filesystem-recovery-in-LVM2.html Use a Centos rescue disk 1) Do startup network interfaces 2) Don't try to automatically mount the filesystems - not even readonly 3) lvm vgchange --ignorelockingfailure -P -a y 4) fdisk -l, and guess which partition is which based on size: the small one was /boot, and the large one was / 5) mkdir /mnt/boot 6) mount /dev/hda1 /mnt/boot 7) Look up the device node for the root filesystem in /mnt/boot/grub/grub.conf 8) A first tentative step, to see if things are working: fsck -n /dev/VolGroup00/LogVol00 9) Dive in: fsck -f -y /dev/VolGroup00/LogVol00 10) Wait a while... Be patient. Don't interrupt it 11) Reboot Dean.
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 -- Bill -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20060629/1b44ab18/attachment-0002.sig>
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.Keep in mind that backup super-blocks will differ depending on files system size (IIRC) and block size (IIRC again) and who knows what? If your FS is "large" or ... anyway, here my backup super blocks an FS made as indicated ################# m k e 2 f s & m k d i r ################ Filesystem label=/Home01 OS type: Linux Block size=2048 (log=1) Fragment size=2048 (log=1) 524288 inodes, 2097152 blocks 20971 blocks (1.00%) reserved for the super user First data block=0 Maximum filesystem blocks=538968064 128 block groups 16384 blocks per group, 16384 fragments per group 4096 inodes per group Superblock backups stored on blocks: 16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816, 1327104, 2048000 Writing inode tables: 0/128...127/128 done Writing inode tables: 0/128...127/128 done Creating journal (8192 blocks): done> <snip>HTH -- Bill -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20060629/34f3209e/attachment-0002.sig>
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
OK, I'm still trying to solve this. Though the server has been up rock steady, but the errors concern me. I built this on a test box months ago and now that I am thinking, I may have built it originally on a drive of a different manufacturer, although about the same size (20g). This may have something to do with it. What is the easiest way to get these errors taken care of? I've tried e2fsck, and also ran fsck on Vol00. Looks like I made a fine mess of things. Is there I wasy to fix it without reloading Centos? Here are some outputs: snapshot from /var/log/messages: Jul 12 04:03:21 hostname kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error } Jul 12 04:03:21 hostname kernel: hda: dma_intr: error=0x84 { DriveStatusError BadCRC } Jul 12 04:03:21 hostname kernel: ide: failed opcode was: unknown sfdisk -l: Disk /dev/hda: 39870 cylinders, 16 heads, 63 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 39870/16/63). For this listing I'll assume that geometry. Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 12 13- 104391 83 Linux /dev/hda2 13 2500 2488 19984860 8e Linux LVM /dev/hda3 0 - 0 0 0 Empty /dev/hda4 0 - 0 0 0 Empty Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless. [Use the --force option if you really want this] sfdisk -lf Disk /dev/hda: 39870 cylinders, 16 heads, 63 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 39870/16/63). For this listing I'll assume that geometry. Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 12 13- 104391 83 Linux /dev/hda2 13 2500 2488 19984860 8e Linux LVM /dev/hda3 0 - 0 0 0 Empty /dev/hda4 0 - 0 0 0 Empty Disk /dev/hda1: 207 cylinders, 16 heads, 63 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/hda1: unrecognized partition No partitions found Disk /dev/hda2: 39652 cylinders, 16 heads, 63 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/hda2: unrecognized partition No partitions found Disk /dev/dm-0: cannot get geometry Disk /dev/dm-0: 0 cylinders, 0 heads, 0 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/dm-0: unrecognized partition No partitions found Disk /dev/dm-1: cannot get geometry Disk /dev/dm-1: 0 cylinders, 0 heads, 0 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/dm-1: unrecognized partition No partitions found