Sample Header Ad - 728x90

Reassembling RAID 5 when 1 disk has been overwritten

0 votes
2 answers
55 views
I was having trouble with my Ubuntu system that was running a Raid 5 setup with 4x4Tb drives: /dev/sda. The OS was installed on /dev/sde. So I decided it was time to do a clean install of the OS.. And here is where my stupidity came in.. I accidentally installed Ubuntu on /dev/sda. I've now re-installed to /dev/sde but I'm having trouble re-assembling the raid I had backed up my /etc folder but again stupidity, I backed it up to my raid thinking I wouldn't have any issues reassembling it I know the data on /dev/sda is lost.. I'm just wondering how much I can recover with the other 3 drives. In general, i get the following error on most attempts. If I change the order of the disks, then i get this error for the first drive in the list
mdadm: no recogniseable superblock on /dev/sdb1
mdadm: /dev/sdb1 has no superblock - assembly aborted
I've tried to assemble a number of different ways but always hitting an issue
sudo mdadm --assemble --scan
sudo mdadm --assemble --force /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
I've thought that maybe i just assemble with the 3 good disks and then I could add /dev/sda after but I get that same error
sudo mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1
I even thought maybe I could create a new raid 5 with /dev/sda and then add the others in but that didn't seem to work either
sudo mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda1 missing missing missing
sudo mdadm --manage /dev/md0 --re-add /dev/sdb1
sudo mdadm --manage /dev/md0 --add /dev/sdb1
Output of fdisk -l
Disk /dev/sda: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000DM000-1F21
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EEFB7529-8BC9-2C46-B529-DFEC565586AE

Device     Start        End    Sectors  Size Type
/dev/sda1   2048 7814037134 7814035087  3.6T Linux filesystem


Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000DM000-1F21
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6559C610-734A-4978-B52D-FB8561D8CB6E

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 7814035455 7814033408  3.6T Linux RAID


Disk /dev/sdc: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000DM000-1F21
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0F3B652A-6AB8-4A98-B91B-F50C1373347A

Device     Start        End    Sectors  Size Type
/dev/sdc1   2048 7814035455 7814033408  3.6T Linux RAID


Disk /dev/sdd: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000DM000-1F21
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E50D44A3-67C3-43AD-AD96-D11A66A0DCC8

Device     Start        End    Sectors  Size Type
/dev/sdd1   2048 7814035455 7814033408  3.6T Linux RAID


Disk /dev/sde: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: OCZ-SOLID3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6D5DF417-2864-48FC-83DC-A1E42EF3DE9C

Device       Start       End   Sectors   Size Type
/dev/sde1     2048   2203647   2201600     1G EFI System
/dev/sde2  2203648 234438655 232235008 110.7G Linux filesystem
Output from mdadm --examine /dev/sd*
/dev/sda:
   MBR Magic : aa55
Partition :   4294967295 sectors at            1 (type ee)
/dev/sda1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 1d5b33b8:7c4c31ce:c694e0b0:d0335928
           Name : mediaserver:0  (local to host mediaserver)
  Creation Time : Wed Sep 25 21:14:48 2024
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 7813770895 sectors (3.64 TiB 4.00 TB)
     Array Size : 11720655360 KiB (10.92 TiB 12.00 TB)
  Used Dev Size : 7813770240 sectors (3.64 TiB 4.00 TB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=655 sectors
          State : clean
    Device UUID : 15aba39b:06fdb0ba:3b3fe20f:d646646e

Internal Bitmap : 8 sectors from superblock
    Update Time : Wed Sep 25 21:14:48 2024
  Bad Block Log : 512 entries available at offset 24 sectors
       Checksum : 650e8daa - correct
         Events : 0

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : A... ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb:
   MBR Magic : aa55
Partition :   4294967295 sectors at            1 (type ee)
mdadm: No md superblock detected on /dev/sdb1.
/dev/sdc:
   MBR Magic : aa55
Partition :   4294967295 sectors at            1 (type ee)
mdadm: No md superblock detected on /dev/sdc1.
/dev/sdd:
   MBR Magic : aa55
Partition :   4294967295 sectors at            1 (type ee)
mdadm: No md superblock detected on /dev/sdd1.
/dev/sde:
   MBR Magic : aa55
Partition :    234441647 sectors at            1 (type ee)
/dev/sde1:
   MBR Magic : aa55
mdadm: No md superblock detected on /dev/sde2.
Asked by ikbenben (1 rep)
Sep 26, 2024, 11:04 AM
Last activity: Sep 28, 2024, 09:34 AM