FedoraForum.org - Fedora Support Forums and Community
Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2009
    Posts
    10

    Unhappy LVM Crashed after fsck on root partition

    Hi, I am new in this forum but please help me,
    I got 2 HDDs, I had created LVM by two of them. When I was trying to install quota it was saying it is better if you run fsck first message. When I tried to run fsck. It warned me that I could lose some of my data. So it happened. Actually it is worse:

    I can't boot my Fedora 11. When I try to run installer in rescue mode, it says no linux partition find.
    When I try to install (just to see partitions) it shows LVM volumes of hdds are ok but the partition which is / (root)partition seems in unknown format.

    How can I save my datas? Or can i restore my partitions, LVM?

    Please help, thanks.

  2. #2
    Join Date
    Jan 2005
    Posts
    5,057
    LVM had nothing to do with these problems.

    e2fsck should not be run for a mounted file system.

    SJ
    Do the Math

  3. #3
    Join Date
    Nov 2009
    Posts
    10

    Question

    Unfortunately yes, I shouldn't have done this, but I want to rescue now, what can I do?

  4. #4
    Join Date
    Jun 2005
    Posts
    723
    Don't know about rescuing, but you could reinstall Fedora.
    You'd need to delete and recreate the damaged partition in the install process.

    Good luck
    But of course, take the above with a grain of salt...

  5. #5
    Join Date
    Nov 2009
    Posts
    10
    thanks but i really need to restore the data in this disks, isn't there any way to do that?

  6. #6
    Join Date
    Nov 2009
    Posts
    1
    Hi,
    I resotore some data after the same event on my crypted lvm2. I used fedora restore option from installation cd
    I will write command maybe they will be usefull for you:
    1) cryptsetup -y /dev/sda5 my_lvm2
    2) lvm ,and then lvchange -ay, this maped my uncrypted partiton, so i used
    3) fsck -y /dev/vg_node/vg_root ( this names were on my machines ), u can get them after lvscan command from lvm tool
    4) fsck was running about 1.5 day and stoped
    5) I mounted parition and in lost+found I found some restore data.

    Propably fsck resotre almost all of the data,but I lost directory structure, and will never run system again on this partition. Good luck for you

  7. #7
    Join Date
    Nov 2009
    Posts
    10
    Quote Originally Posted by jarodpol
    Hi,
    I resotore some data after the same event on my crypted lvm2. I used fedora restore option from installation cd
    I will write command maybe they will be usefull for you:
    1) cryptsetup -y /dev/sda5 my_lvm2
    2) lvm ,and then lvchange -ay, this maped my uncrypted partiton, so i used
    3) fsck -y /dev/vg_node/vg_root ( this names were on my machines ), u can get them after lvscan command from lvm tool
    4) fsck was running about 1.5 day and stoped
    5) I mounted parition and in lost+found I found some restore data.

    Propably fsck resotre almost all of the data,but I lost directory structure, and will never run system again on this partition. Good luck for you
    thanks a lot for your advise, I will try when I get back home. But one thing I want to know, were you able to mount your lvm partition before fsck? Because whenever I want to mount, it says something like, "define partition format". Thanks again for your advise.

  8. #8
    Join Date
    Jan 2005
    Posts
    5,057
    lvm lvchange -a y
    # this only activates the LV's on all VG, and your LVM should already be know so it is not necessary.
    #fsck.ext4 or fsck.ext3 or e2fsck
    # e2fsckwill determine the type.
    e2fsck /dev/VolGroup00/LogVol00
    e2fsck /dev/mapper/VolGroup00-LogVol00
    fsck.ext4 /dev/VolGroup00/LogVol00
    fsck.ext4 /dev/mapper/VolGroup00-LogVol00

    # mount after fsck is done.
    # use mapper
    mount /dev/mapper/VolGroup00-LogVol00 /mnt/somemountpoint
    # does not work use /dev path
    mount /dev/VolGroup00/LogVol00 -t ext4 /mnt/somemountpoint

    SJ
    Do the Math

  9. #9
    Join Date
    Nov 2009
    Posts
    10
    Quote Originally Posted by jarodpol
    Hi,
    I resotore some data after the same event on my crypted lvm2. I used fedora restore option from installation cd
    I will write command maybe they will be usefull for you:
    1) cryptsetup -y /dev/sda5 my_lvm2
    2) lvm ,and then lvchange -ay, this maped my uncrypted partiton, so i used
    3) fsck -y /dev/vg_node/vg_root ( this names were on my machines ), u can get them after lvscan command from lvm tool
    4) fsck was running about 1.5 day and stoped
    5) I mounted parition and in lost+found I found some restore data.

    Propably fsck resotre almost all of the data,but I lost directory structure, and will never run system again on this partition. Good luck for you
    thank you again, but when I try to run the command "cryptsetup -y /dev/sda2 my_lvm2" I get "cryptsetup: Unknown action."
    why this happens? do you have an idea?

    ---------- Post added at 03:22 AM CST ---------- Previous post was at 03:21 AM CST ----------

    Quote Originally Posted by SlowJet
    lvm lvchange -a y
    # this only activates the LV's on all VG, and your LVM should already be know so it is not necessary.
    #fsck.ext4 or fsck.ext3 or e2fsck
    # e2fsckwill determine the type.
    e2fsck /dev/VolGroup00/LogVol00
    e2fsck /dev/mapper/VolGroup00-LogVol00
    fsck.ext4 /dev/VolGroup00/LogVol00
    fsck.ext4 /dev/mapper/VolGroup00-LogVol00

    # mount after fsck is done.
    # use mapper
    mount /dev/mapper/VolGroup00-LogVol00 /mnt/somemountpoint
    # does not work use /dev path
    mount /dev/VolGroup00/LogVol00 -t ext4 /mnt/somemountpoint

    SJ
    thanks for your reply, but when I try to activate my lv's via "lvchange -ay" it says Please give logical volume path(s). what can I give this? I tried /dev/sda2 and /dev/sdb1 (which are members of my lvm) It says "Invalid argument /dev/sda2 Error during parsing of command line"
    Can you help me? Thanks

  10. #10
    Join Date
    Jan 2005
    Posts
    5,057
    There are man pages for each command.
    lvchange needs a specificity volume group
    lv -ay VolGroup00/LogVol00

    vg -ay VolGroup00
    # activates all LV's on VolGroup00
    vgchange -ay
    # activates all LV's on all VG's

    use vgchange -a y

    SJ
    Do the Math

  11. #11
    Join Date
    Nov 2009
    Posts
    10
    thank you it worked. "e2fsck -y /dev/VolumeGroup/LogicalVolume" is running now

    ---------- Post added at 02:07 PM CST ---------- Previous post was at 01:34 PM CST ----------

    I run e2fsck and it went in an infinite loop, there are many numbers pozitives and negatives. Is this normal? What should I do? I tried fsck.ext3 and fsck.ext4 as well.

    ---------- Post added at 02:43 PM CST ---------- Previous post was at 02:07 PM CST ----------

    After the meaningless numbers, it has ended and said fixed.
    The size of the lost+found folder is 43GB, far enough for me. It rescued my critical files, thanks everyone (especially SlowJet) who helped me on this.

  12. #12
    Join Date
    Dec 2009
    Posts
    3
    This was the quickest fix thanks SlowJet


    Quote Originally Posted by SlowJet
    lvm lvchange -a y
    # this only activates the LV's on all VG, and your LVM should already be know so it is not necessary.
    #fsck.ext4 or fsck.ext3 or e2fsck
    # e2fsckwill determine the type.
    e2fsck /dev/VolGroup00/LogVol00
    e2fsck /dev/mapper/VolGroup00-LogVol00
    fsck.ext4 /dev/VolGroup00/LogVol00
    fsck.ext4 /dev/mapper/VolGroup00-LogVol00

    # mount after fsck is done.
    # use mapper
    mount /dev/mapper/VolGroup00-LogVol00 /mnt/somemountpoint
    # does not work use /dev path
    mount /dev/VolGroup00/LogVol00 -t ext4 /mnt/somemountpoint

    SJ

Similar Threads

  1. fsck non-existent partition at boot
    By slybloty in forum Hardware & Laptops
    Replies: 0
    Last Post: 28th August 2008, 09:34 PM
  2. How to fsck LVM Partition
    By borgward in forum Using Fedora
    Replies: 14
    Last Post: 26th February 2008, 08:00 AM
  3. How to fsck a read-only partition?
    By rshum in forum Using Fedora
    Replies: 1
    Last Post: 24th May 2007, 07:09 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •