The error below was occuring in my LVM setup when trying to list certain directories. Basically my lv(logical volume) was corrupted...:
/dev/sdb1: read failed after 0 of 512 at 54010904576: Input/output error
I used a combination of the commands below for my lvm setup to restore and fix the corrupted lv(logical volume) in my Volume Group Below. The source of the fix came from a combination if you read the two Web links below in order.
The line numbers in front of the commands are listed because of the output of the history command. Figured i'd share this with folks that may run into a Corrupt lv(logical volume) Issue. Although the fsck -fy command below took a few hours, it was worth it. The alternative was the /etc/lvm/archive method of restoring the structure of my lvm, but I had lost a write up of documenttion how I restored my lvm on a different machine. I didn't feel like searching all over for it so i used the method below. { the /etc/lvm/archive method is more heavy lifting if you deleted one of your lv's (logical volumes) in error }.
Commands below are what I Used to fix the Corrupted lv (logical volume) which displayed an error in the title of this Post...:
399 sudo vgscan
405 sudo lvchange -an /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
406 sudo vgchange -an /dev/Super-LVM-QuietGaragePC-Ver1-VG
407 sudo vgscan
408 sudo vgchange -ay /dev/Super-LVM-QuietGaragePC-Ver1-VG
409 sudo lvscan
410 sudo lvchange -ay /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
411 sudo lvchange -an /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
412 sudo lvchange --refresh /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
413 sudo lvscan
414 sudo lvchange -ay /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
416 sudo ./Gar*lvm ( this is a script i use just to mount my lvm)
422 sudo umount /media/Gar*
423 sudo lvchange -ay /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
424 sudo lvchange -ay /dev/Super-LVM-QuietGaragePC-Ver1-VG
426 sudo vgchange -an /dev/Super-LVM-QuietGaragePC-Ver1-VG
429 sudo vgchange -ay /dev/Super-LVM-QuietGaragePC-Ver1-VG
431 sudo fsck -fy /dev/Super-LVM-QuietGaragePC-Ver1-VG/MyQuietGaragePC-Pool-id-1-LV
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*** That is the end of the Restore commands once the last command fsck -fy runs for a few hours. When Completed you will be able to mount your lvm.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I'm Posting the Web Pages and the Source that helped me Resolve my Issue mentioned earlier above...:
Thanks again to the folks at the sites below...:
https://www.linuxtechi.com/fixing-lvm-io-errors/
http://coding.infoconex.com/post/201...ux-Rescue-Disk
Running FSCK on an LVM (Logical Volume Manager) using Linux Rescue Disk
12 October 2012 jscott
I am not a linux expert and so when I have problems from time to time I usually have to go searching for the answer. It usually takes me looking at several articles to get my answer and when I am finished I always try and put together a article that has everything I need to know in once spot. Please feel free to correct or suggest a better alternative if you come across this article and would like to provide feedback.
Yesterday I had a server crash and when I logged into the console it was showing a kernal panic!!
I rebooted and the same thing happened over on every reboot. This machine had some problems in the past with the disk going into read only mode so I assumed the issue was related to something wrong with the disk. So I grabbed a CentOS disk and booted up with it and booted into resuce mode and skipped the step that would mount the disks.
Once in I attempted to run fsck /dev/sda1 but I got an error back indicating it did not recognize the volume as EXT2. Searching around I found the following solution if you are using a LVM.
Perform all of the following commands in the following order. I provided a link for each command if you are interested in knowing more about what each of the commands do.
Scan all disks for partiitions:
lvm pvscan
Scan all disks for volume groups and build /etc/lvmtab and /etc/lvmtab.d/* which are the database for all other lvm commands:
lvm vgscan
Change attributes of a logical volume
lvm lvchange -ay VolGroup00
Scan all disks for logical volumes
lvm lvscan
Then I was able to run fsck as follows
fsck -f /dev/VolGroup00/LogVol00
Which of course reported TONS of errors and fixed them up. I do not claim to be an expert but this worked for me. Hopefully this information will help someone else out in the future.