How to mount parition in from a working driver in RAID1

5,556

With one of the drives dead you will no longer be able to mount /dev/md1 - you have to mount a partition on the drive that is still alive: /dev/sdb2 or /dev/sdb3

You can get more information using mdadm --examine /dev/sdb2

If sdb2 and sdb3 were running RAID0 all data on those partitions is lost.

Share:
5,556

Related videos on Youtube

ProDraz
Author by

ProDraz

Updated on September 18, 2022

Comments

  • ProDraz
    ProDraz over 1 year

    One of hard drives in array is dead, I'm unsure if it's raid0 or raid1, what I'm trying to achieve is mount the working drive and make a backup of what's left.

    If I mount /dev/md127 then I can see only some grub files, total size it arround 100mb.

    If I try to mount /dev/md1 I get:

    root@rescue:~# mount /dev/md1 /mnt
    mount: /dev/md1: can't read superblock
    

    Some outputs:

    root@rescue:~# fdisk -l
    Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
    255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0001f015
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          63      208844      104391   fd  Linux raid autodetect
    /dev/sdb2          208845    16787924     8289540   fd  Linux raid autodetect
    /dev/sdb3        16787925  2930272064  1456742070   fd  Linux raid autodetect
    
    Disk /dev/md127: 106 MB, 106823680 bytes
    2 heads, 4 sectors/track, 26080 cylinders, total 208640 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/md127 doesn't contain a valid partition table
    
    
    root@rescue:~# cat /proc/mdstat
    Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
    md127 : active raid1 sdb1[1]
          104320 blocks [2/1] [_U]
    
    unused devices: <none>
    
       root@rescue:~# mdadm --examine /dev/sdb2
    /dev/sdb2:
              Magic : a92b4efc
            Version : 0.90.00
               UUID : fca66a1e:c6aba1f7:ace437e0:ae545265
      Creation Time : Thu Oct 21 01:57:07 2010
         Raid Level : raid0
       Raid Devices : 2
      Total Devices : 2
    Preferred Minor : 1
    
        Update Time : Thu Oct 21 01:57:07 2010
              State : active
     Active Devices : 2
    Working Devices : 2
     Failed Devices : 0
      Spare Devices : 0
           Checksum : 6138e9b8 - correct
             Events : 1
    
         Chunk Size : 256K
    
          Number   Major   Minor   RaidDevice State
    this     1       8       18        1      active sync   /dev/sdb2
    
       0     0       8        2        0      active sync
       1     1       8       18        1      active sync   /dev/sdb2
    

    If anyone could share, how to mount driver properly to be able to access data (preferably in read-only mode so I don't mess up anything if that's possible)...

    root@rescue:~# mdadm --examine --scan
    ARRAY /dev/md127 UUID=0464b5c4:d777ef5e:17b64c46:2e5e61c3
    ARRAY /dev/md1 UUID=fca66a1e:c6aba1f7:ace437e0:ae545265
    ARRAY /dev/md2 UUID=46c22b6d:dc9668a4:13d0e329:c7b8b0ca
    

    AND

    root@rescue:~# mdadm --detail /dev/md126
    mdadm: cannot open /dev/md126: No such file or directory
    

    AND

    root@rescue:~/dd_rescue# mdadm --detail /dev/md1
    mdadm: md device /dev/md1 does not appear to be active.
    root@rescue:~/dd_rescue#
    root@rescue:~/dd_rescue#
    root@rescue:~/dd_rescue#
    root@rescue:~/dd_rescue# mdadm --detail /dev/md2
    mdadm: md device /dev/md2 does not appear to be active.
    

    SMART

        root@rescue:~# smartctl -a /dev/sda
    smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.2-xxxx-std-ipv6-32] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF INFORMATION SECTION ===
    Device Model:     ST_M13FQBL
    Serial Number:    QNR_BFW
    Firmware Version: 1117F38F
    User Capacity:    4,142,054,400 bytes [4.14 GB]
    Sector Size:      512 bytes logical/physical
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   6
    ATA Standard is:  ATA/ATAPI-6 T13 1410D revision 2
    Local Time is:    Thu May 16 01:37:37 2013 CEST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    Error SMART Values Read failed: scsi error aborted command
    Smartctl: SMART Read Values failed.
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: UNKNOWN!
    SMART Status, Attributes and Thresholds cannot be read.
    
    Error SMART Error Log Read failed: scsi error aborted command
    Smartctl: SMART Error Log Read Failed
    Error SMART Error Self-Test Log Read failed: scsi error aborted command
    Smartctl: SMART Self Test Log Read Failed
    Device does not support Selective Self Tests/Logging
    
    • Danila Ladner
      Danila Ladner almost 11 years
      Why are you trying to mount /dev/md1? your /boot partition is on /dev/md127 seems like. In /dev/ path do you see only /dev/md127?
    • ProDraz
      ProDraz almost 11 years
      @DanilaLadner I've updated my original post, was misstype, mounting md127 works, but as said It doesn't reveal more then 100mb of data and that's some grub files, I guess that's because it's boot partition or something.
    • Danila Ladner
      Danila Ladner almost 11 years
      can you show what mdadm --examine --scan shows? and what mdadm --detail /dev/md126 show?
    • Danila Ladner
      Danila Ladner almost 11 years
      oh sorry then. what about mdadm --detail /dev/md1 and /dev/md2
    • ProDraz
      ProDraz almost 11 years
      @DanilaLadner updated OP (at bottom)
    • Danila Ladner
      Danila Ladner almost 11 years
      Ok. so you need to see why that drive did not show up. Is this a VM? any smart errors detected? Some more info need for that drive, if it is completely dead, you are screwed with that dead drive raid0 config.
    • ProDraz
      ProDraz almost 11 years
      @DanilaLadner check OP again :S
    • Danila Ladner
      Danila Ladner almost 11 years
      Well yeah it cannot read any smart errors, that means the disk is shut along with its s.m.a.r.t output on the controller of the disk. I hope you have backups. + Try never ever create something with raid0 in production, if raid0 is stuck in your head as best solution then, at least mirror it --> raid 0+1
  • c2h5oh
    c2h5oh almost 11 years
    try mdadm --assemble --scan and if it succeeds try mounting /dev/md1
  • ProDraz
    ProDraz almost 11 years
    root@rescue:~/dd_rescue# mdadm --assemble --scan mdadm: /dev/md/2_0 assembled from 1 drive - not enough to start the array. mdadm: /dev/md/1_0 assembled from 1 drive - not enough to start the array. mdadm: No arrays found in config file or automatically
  • Michael Hampton
    Michael Hampton almost 11 years
    Yep, looks like they were RAID 0 and you lose. Sorry. Hope you had good backups.