Home > error 2 > error 2 while executing fsck.lvm2

Error 2 While Executing Fsck.lvm2

Registered: 2010-10-06 Posts: 19 [Solved] Restore damaged LVM Hi,I got some issue with LVM. I have a VG named VGFix which containt one LV named ArchRoot, which have one partition /dev/sda2. All my Arch Linux is installed in there. I wanted to migrate the whole VG to a second disk partition /dev/sdb3. I follow the guide here : http://linuxman.wikispaces.com/Moving+a … a+new+diskI extend my VG, then move the PV /dev/sda2 to /dev/sdb3. It failed because my second disk partition is slightly smaller. So I shrink the LV ArchRoot without any error and I must messed up somewhere because now, when I boot I got this error :[...] Activating logical volumes... 1 logical volume(s) in volume group "VGFix" now active :: mounting '/dev/mapper/VGFix-ArchRoot' on real root mount: wrong fs type, bad option, bad superblock on /dev/mapper/VGFix-ArchRoot, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so You are now being dropped into an emergency shellI tried to run some fsck by booting with Arch LiveCD on an Usb key. But I got this error :fsck: fsck.LVM2_member: not found fsck: error 2 while executing fsck.LVM2_member for /dev/sda2And also, in the livecd environment, I don't see my lvm structure, neither /dev/VGFix or /dev/mapper/VGFix-ArchRoot. But still, when I run pvscan or vgdisplay, I get my LVM structure correctly. Now I can't mount my root filesystem to see if there is anything damaged ...Please help me rescue my Arch. I don't want to reinstall everything :-( Last edited by mhtrinh (2012-10-04 18:32:56) Offline #2 2012-10-04 10:30:14 p0x8 Member Registered: 2012-09-20 Posts: 67 Re: [Solved] Restore damaged LVM In the livecd environment you have to manually activate the VG:root@archiso ~ # vgchange -aThis should give you access to at least /dev/VGFix and, if the LV is still there, to /dev/mapper/VGFix-Archroot also. And the LV seems to be there, at least according to the log you posted. Maybe you forgot to resize the file system before shrinking the LV? That could mess it up considerably. EXT file systems usually keep multiple copies of the superblock and other important information, so try running a fsck.$fs on /dev/mapper/VGFix-Archroot, where $fs is your file system type. Offline #3 2012-10-04 13:13:23 mhtrinh Member Registered: 2010-10-06 Posts: 19 Re: [Solved] Restore damaged LVM Thanks a lot !!! That is it ! I ran "vgchange -a y" and then I managed to see my lvm structure

Xen 64 bit HVM strangeness Virsh/Xend management » Recovering VMs when they fail with disk errors My setup is carving out a logical volume on my domU physical volume, and handing that to virt-install to use as the root disk. https://bbs.archlinux.org/viewtopic.php?id=150001 Now, it also partitions the LV, then installs LVM on top of it. BUT, that change isn't passed back to the VM host, so the what's inside the disk image is opaque, ie. can't be seen by disk tools. https://kyle.io/2010/11/recovering-vms-when-they-fail-with-disk-errors/ When my fileserver VM failed to boot with an error, I knew something had to be wrong. But, running fsck /dev/domU/helium didn't work. But the following steps did: Step 1. Read the partitions in the disk image: kpartx -a /dev/domU/helium This setup block devices in /dev/mapper - namely domU-helium1 and domU-helium2. domU-helium1 was my /boot partition. No problems running fsck on it (Since grub can't use LVM, it's a partition on its own): [[emailprotected] mapper]# fsck /dev/mapper/domU-helium1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.10 (10-Feb-2009)
/dev/mapper/domU-helium1: clean, 44/128016 files, 78681/512000 blocks But, domU-helium2 was a different story: [[emailprotected]

 

© Copyright 2019|winbytes.org.