From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx2.redhat.com (mx2.redhat.com [10.255.15.25]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4C3T3ET009142 for ; Fri, 11 May 2007 23:29:03 -0400 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.232]) by mx2.redhat.com (8.13.1/8.13.1) with ESMTP id l4C3T1Of018233 for ; Fri, 11 May 2007 23:29:01 -0400 Received: by nz-out-0506.google.com with SMTP id s18so1492697nze for ; Fri, 11 May 2007 20:29:01 -0700 (PDT) Message-ID: <230d1df80705112029w7b4b9fd0ncf7a733363b44705@mail.gmail.com> Date: Fri, 11 May 2007 23:29:00 -0400 From: "Saad Shakhshir" Sender: shakhshir@gmail.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_172235_6170283.1178940540481" Subject: [linux-lvm] Restoring data after losing a drive Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: linux-lvm@redhat.com ------=_Part_172235_6170283.1178940540481 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I lost one of my drives that was a physical volume in my lvm. The volume group spanned across all the drives and so did the logical volume. I know that the data on the good drives is still intact I just don't know how to get the lvm up and running again to be able to read the data. I tried running 'vgreduce --removemissing fileserver' and that managed to restore my other small logical volume that was located entirely on one of the (still good) physical volumes. The other large logical volume is still not showing up. I'm going to attach the last good configuration from /etc/lvm/archive The drive that died was pv0. I really hope that someone can help with this. It's terrible losing so much data... # Generated by LVM2: Fri May 11 19:48:00 2007 contents = "Text Format Volume Group" version = 1 description = "Created *before* executing 'vgreduce --removemissing fileserver'" creation_host = "veritas" # Linux veritas 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 creation_time = 1178927280 # Fri May 11 19:48:00 2007 fileserver { id = "9vePH6-W5lO-S1HD-aQyC-jOCY-R0Re-nIBPcJ" seqno = 12 status = ["RESIZEABLE", "PARTIAL", "READ"] extent_size = 8192 # 4 Megabytes max_lv = 0 max_pv = 0 physical_volumes { pv0 { id = "V2yZV5-qx19-7c98-5WLY-9lTF-Wb4c-70Q0na" device = "unknown device" # Hint only status = ["ALLOCATABLE"] pe_start = 384 pe_count = 76310 # 298.086 Gigabytes } pv1 { id = "MZrncO-HYwT-6YEB-w3hV-2YqP-HZRY-u6OMyf" device = "/dev/mapper/hdb1" # Hint only status = ["ALLOCATABLE"] pe_start = 384 pe_count = 59618 # 232.883 Gigabytes } pv2 { id = "52vIhv-lOnI-RDQ3-Z5KT-4Ifc-thL0-uLZQVo" device = "/dev/mapper/sdb1" # Hint only status = ["ALLOCATABLE"] pe_start = 384 pe_count = 59618 # 232.883 Gigabytes } pv3 { id = "0q8rC2-9Nxi-YriB-7oa6-0wp4-frBa-GT9aQt" device = "/dev/mapper/hda3" # Hint only status = ["ALLOCATABLE"] pe_start = 384 pe_count = 26611 # 103.949 Gigabytes } } logical_volumes { data { id = "O0WU1C-0f0H-ZZvL-AwIc-vl8x-seFe-J3uE2X" status = ["READ", "WRITE", "VISIBLE"] segment_count = 4 segment1 { start_extent = 0 extent_count = 76310 # 298.086 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv0", 0 ] } segment2 { start_extent = 76310 extent_count = 59618 # 232.883 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv1", 0 ] } segment3 { start_extent = 135928 extent_count = 51937 # 202.879 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv2", 0 ] } segment4 { start_extent = 187865 extent_count = 26611 # 103.949 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv3", 0 ] } } home { id = "13Bra6-cE4i-MRgA-CZhC-RC0f-qtEo-R2Y0x2" status = ["READ", "WRITE", "VISIBLE"] segment_count = 1 segment1 { start_extent = 0 extent_count = 7681 # 30.0039 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv2", 51937 ] } } } } ------=_Part_172235_6170283.1178940540481 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I lost one of my drives that was a physical volume in my lvm.  The volume group spanned across all the drives and so did the logical volume.  I know that the data on the good drives is still intact I just don't know how to get the lvm up and running again to be able to read the data.

I tried running 'vgreduce --removemissing fileserver' and that managed to restore my other small logical volume that was located entirely on one of the (still good) physical volumes.  The other large logical volume is still not showing up.

I'm going to attach the last good configuration from /etc/lvm/archive  The drive that died was pv0. 

I really hope that someone can help with this.  It's terrible losing so much data...

# Generated by LVM2: Fri May 11 19:48:00 2007

contents = "Text Format Volume Group"
version = 1

description = "Created *before* executing 'vgreduce --removemissing fileserver'"

creation_host = "veritas"    # Linux veritas 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686
creation_time = 1178927280    # Fri May 11 19:48:00 2007

fileserver {
    id = "9vePH6-W5lO-S1HD-aQyC-jOCY
-R0Re-nIBPcJ"
    seqno = 12
    status = ["RESIZEABLE", "PARTIAL", "READ"]
    extent_size = 8192        # 4 Megabytes
    max_lv = 0
    max_pv = 0

    physical_volumes {

        pv0 {
            id = "V2yZV5-qx19-7c98-5WLY-9lTF-Wb4c-70Q0na"
            device = "unknown device"    # Hint only

            status = ["ALLOCATABLE"]
            pe_start = 384
            pe_count = 76310    # 298.086 Gigabytes
        }

        pv1 {
            id = "MZrncO-HYwT-6YEB-w3hV-2YqP-HZRY-u6OMyf"
            device = "/dev/mapper/hdb1"    # Hint only

            status = ["ALLOCATABLE"]
            pe_start = 384
            pe_count = 59618    # 232.883 Gigabytes
        }

        pv2 {
            id = "52vIhv-lOnI-RDQ3-Z5KT-4Ifc-thL0-uLZQVo"
            device = "/dev/mapper/sdb1"    # Hint only

            status = ["ALLOCATABLE"]
            pe_start = 384
            pe_count = 59618    # 232.883 Gigabytes
        }

        pv3 {
            id = "0q8rC2-9Nxi-YriB-7oa6-0wp4-frBa-GT9aQt"
            device = "/dev/mapper/hda3"    # Hint only

            status = ["ALLOCATABLE"]
            pe_start = 384
            pe_count = 26611    # 103.949 Gigabytes
        }
    }

    logical_volumes {

        data {
            id = "O0WU1C-0f0H-ZZvL-AwIc-vl8x-seFe-J3uE2X"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 4

            segment1 {
                start_extent = 0
                extent_count = 76310    # 298.086 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv0", 0
                ]
            }
            segment2 {
                start_extent = 76310
                extent_count = 59618    # 232.883 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv1", 0
                ]
            }
            segment3 {
                start_extent = 135928
                extent_count = 51937    # 202.879 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv2", 0
                ]
            }
            segment4 {
                start_extent = 187865
                extent_count = 26611    # 103.949 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv3", 0
                ]
            }
        }

        home {
            id = "13Bra6-cE4i-MRgA-CZhC-RC0f-qtEo-R2Y0x2"
            status = ["READ", "WRITE", "VISIBLE"]
            segment_count = 1

            segment1 {
                start_extent = 0
                extent_count = 7681    # 30.0039 Gigabytes

                type = "striped"
                stripe_count = 1    # linear

                stripes = [
                    "pv2", 51937
                ]
            }
        }
    }
}
------=_Part_172235_6170283.1178940540481--