My RAID needs help.

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
coffee412
Level 8
Level 8
Posts: 2212
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

My RAID needs help.

Post by coffee412 »

I run an external JOBD 4 bay hard drive box via usb3 that is a RAID5 array with 3 members. I had one drive fail and one of the others has about 130 bad sectors. These drives are 1tb each. I store all my movies and such on them. I have physically removed the bad drive and left the other two in the box. I have it now hooked up to my daily driver pc. The drive dev names have changed of course which Iam sure complicates things.

I ran:

mdadm --assemble --scan

It does find the drives and does notice missing drives. However, Now it thinks it should be a RAID0 array.

The original drives in the array are: /dev/sdg and /dev/sdh.

This is the original config of the array that I took a snapshot of before messing with it:
Screenshot at 2018-08-19 09-05-42.png
The current original drives info:

Code: Select all

max ~ # cat drive-sdg.txt
/dev/sdg:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : c39f249e:77016c26:702c82e8:21258437
           Name : dino:0
  Creation Time : Fri Nov 16 10:08:54 2012
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 1953263024 (931.39 GiB 1000.07 GB)
     Array Size : 1953262592 (1862.78 GiB 2000.14 GB)
  Used Dev Size : 1953262592 (931.39 GiB 1000.07 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262064 sectors, after=432 sectors
          State : clean
    Device UUID : 13b7a5b1:cba3909d:267947ce:6912466b

    Update Time : Sat Aug 18 23:21:44 2018
       Checksum : 1af4da89 - correct
         Events : 288

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAA ('A' == active, '.' == missing, 'R' == replacing)
and

Code: Select all

max ~ # cat drive-sdh.txt
/dev/sdh:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : c39f249e:77016c26:702c82e8:21258437
           Name : dino:0
  Creation Time : Fri Nov 16 10:08:54 2012
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 1953263024 (931.39 GiB 1000.07 GB)
     Array Size : 1953262592 (1862.78 GiB 2000.14 GB)
  Used Dev Size : 1953262592 (931.39 GiB 1000.07 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262064 sectors, after=432 sectors
          State : clean
    Device UUID : 0958859b:71795882:cd4488d9:0f0b21c9

    Update Time : Sat Aug 18 23:21:44 2018
       Checksum : 52b81573 - correct
         Events : 288

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : AAA ('A' == active, '.' == missing, 'R' == replacing)
What is weird is that if I try and assemble the raid it now reports it as a RAID0.

I would hate to lose this data. Its a bunch of movies and some backups that I could do without but would be nice to keep.

My plan is to just get the array active and mounted then copy all the data to a new 2 tb drive. Then retire the 1tb drives and setup a clean RAID5 with all new 2 tb drives and copy it all back.

Is it possible or am I out of luck on this?

coffee
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
User avatar
coffee412
Level 8
Level 8
Posts: 2212
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: My RAID needs help.

Post by coffee412 »

I just applied "Coffee's Law" :

Post about a problem and very soon afterwards you will figure it out on your own.

Im almost there!

Here is what I have done to correct the RAID5 detected as RAID0:

mdadm --remove /dev/md127

Then I have done a re-assembly again (noticed for some reason the drive naming changed ??? :

mdadm --assemble --run /dev/md127 /dev/sdj /dev/sdi

It assembled as a degraded RAID5. However, I still cannot mount it. I get mount errors. Here is the output of mdadm --detail:

Code: Select all

/dev/md127:
        Version : 1.2
  Creation Time : Fri Nov 16 10:08:54 2012
     Raid Level : raid5
     Array Size : 1953262592 (1862.78 GiB 2000.14 GB)
  Used Dev Size : 976631296 (931.39 GiB 1000.07 GB)
   [b]Raid Devices : 3
  Total Devices : 0[/b]
    Persistence : Superblock is persistent

    Update Time : Tue Aug 21 21:47:18 2018
          State : clean, FAILED 
 Active Devices : 0
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       2       0        0        2      removed
       4       0        0        4      removed
Also:

Code: Select all

max ~ # cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md127 : active (auto-read-only) raid5 super 1.2 level 5, 512k chunk, algorithm 2 [3/0] [___]
Well, It says its active. But mounting fails as it does not find the filesystem type which should be ext3 on this array.

coffee

Hummmm. No, I think I still have major issues. Total devices on /dev/md127 shows as 0
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
User avatar
coffee412
Level 8
Level 8
Posts: 2212
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: My RAID needs help. [SOLVED]

Post by coffee412 »

I got it. After several attempts at stopping and starting the raid it finally started with 2/3 drives in degraded mode.

I dont know what the heck happened to the drive letters but perhaps I read them wrong? They are /dev/sdg and /dev/sdh

I am now frantically copying the files to a new 2tb drive!!!

SUCCESS!!!!

Hump! Windows would probably just gave me a BSOD. lol....
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Locked

Return to “Other topics”