All of lore.kernel.org
 help / color / mirror / Atom feed
From: BoD <BoD@JRAF.org>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Help after disk crash
Date: Sat, 13 Dec 2008 15:49:30 +0100	[thread overview]
Message-ID: <4943CB7A.305@JRAF.org> (raw)

Hi!
I recently bought a new hard drive and used LVM to add it to my system. 
Unfortunately the disk just crashed. This is not too bad since I have a 
backup of the most important files.
But currently my system can't work correctly as the crashed disk 
belonged to the vg that contains /usr, /home, /opt, /var and /tmp. (It 
also contains a /docs which I have a backup of, so it doesn't matter if 
I lose it.) The system still boots though and I can login as root.

The vg is on pv0, pv1 and pv2 - It is pv2 that crashed.
I am kind of a newbie so I don't know how to proceed, but I believe it 
should be possible to resize the vg to only use the first 2 pvs.

 From what I see on my /etc/lvm/backup/vg file (see below), it seems 
that only the 'docs' lv uses pv2, I think it is a good sign, right?

So far, after googling a bit I tried vgscan -P and vgchange -Pay and 
tried to mount /dev/vg/usr but it didn't work with the following error: 
EXT3-fs: INFO: recovery required on readonly filesystem. / write access 
unavailable, cannot proceed.

Any help is greatly appreciated! Thanks a lot.

BoD



Here is my /etc/lvm/backup/vg:
==================
# Generated by LVM2 version 2.02.36 (2008-04-29): Sat Nov 15 17:19:28 2008

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'lvextend /dev/vg/docs /dev/sda'"

creation_host = "server"    # Linux server 2.6.25-gentoo-r7 #3 SMP Mon 
Nov 10 01:14:23 CET 2008 i686
creation_time = 1226765968    # Sat Nov 15 17:19:28 2008

vg {
    id = "PH2tSI-13yC-X0oh-vn11-a0n6-1ho5-6UiCs9"
    seqno = 15
    status = ["RESIZEABLE", "READ", "WRITE"]
    extent_size = 8192        # 4 Megabytes
    max_lv = 0
    max_pv = 0

    physical_volumes {

        pv0 {
            id = "eGnP16-zOOk-CR6Y-sDib-27kL-T83J-d6oRp9"
            device = "/dev/hda4"    # Hint only

            status = ["ALLOCATABLE"]
            dev_size = 223656930    # 106.648 Gigabytes
            pe_start = 384
            pe_count = 27301    # 106.645 Gigabytes
        }

        pv1 {
            id = "6DnMKc-Rpb2-Rq52-xsXY-3Nrw-ZJoZ-YAwf1C"
            device = "/dev/hdb1"    # Hint only

            status = ["ALLOCATABLE"]
            dev_size = 240107427    # 114.492 Gigabytes
            pe_start = 384
            pe_count = 29309    # 114.488 Gigabytes
        }

        pv2 {
            id = "9RSjlM-bZ8W-8cC0-s122-bYTo-jyci-DZOSpM"
            device = "/dev/sda"    # Hint only

            status = ["ALLOCATABLE"]
            dev_size = 1953525168    # 931.513 Gigabytes
            pe_start = 384
            pe_count = 238467    # 931.512 Gigabytes
        }
    }

    logical_volumes {

        usr {
            id = "0CY7Ox-x0UG-LVXl-jhEk-IrJG-ig8l-ELPI3C"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 2

            segment1 {
                start_extent = 0
                extent_count = 2560    # 10 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv1", 0
                ]
            }
            segment2 {
                start_extent = 2560
                extent_count = 1280    # 5 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv1", 4352
                ]
            }
        }

        home {
            id = "C26mF3-f25l-K3ct-NgKQ-A6Mb-OgOn-ZtqlAt"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 1

            segment1 {
                start_extent = 0
                extent_count = 1280    # 5 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv0", 0
                ]
            }
        }

        opt {
            id = "9xQxKJ-KrpD-iDny-6SAh-dFyY-4URm-0qAH6l"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 1

            segment1 {
                start_extent = 0
                extent_count = 1280    # 5 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv1", 2560
                ]
            }
        }

        var {
            id = "1Vt3kw-xlHL-Rh66-cYoQ-f5QP-5D9f-Inan21"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 1

            segment1 {
                start_extent = 0
                extent_count = 2560    # 10 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv0", 1280
                ]
            }
        }

        tmp {
            id = "QcoIcV-tSUP-iJ9J-MjZE-cI0n-8fEG-20Gb08"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 1

            segment1 {
                start_extent = 0
                extent_count = 512    # 2 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv1", 3840
                ]
            }
        }

        docs {
            id = "5xHiv1-uzBg-kd8c-jdJQ-QuOa-eFei-w4hUbl"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 3

            segment1 {
                start_extent = 0
                extent_count = 23677    # 92.4883 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv1", 5632
                ]
            }
            segment2 {
                start_extent = 23677
                extent_count = 23461    # 91.6445 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv0", 3840
                ]
            }
            segment3 {
                start_extent = 47138
                extent_count = 238467    # 931.512 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv2", 0
                ]
            }
        }
    }
}

             reply	other threads:[~2008-12-13 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-13 14:49 BoD [this message]
2008-12-13 17:37 ` [linux-lvm] Help after disk crash David Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4943CB7A.305@JRAF.org \
    --to=bod@jraf.org \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.