recovering form RAID 5 mishap

Status
Not open for further replies.

anneranch

Active Member
Joined
Mar 16, 2019
Messages
223
Reaction score
43
Credits
2,078
I needed to add another device - its data - to my working RAID5
To do so I had to unmount the device.

Worked as expected.
Here is the current state of the array:

qy@qy-desktop:~$ sudo mdadm --detail /dev/md10
/dev/md10:
Version : 1.2
Creation Time : Sun Dec 19 13:28:26 2021
Raid Level : raid5
Array Size : 307000320 (292.78 GiB 314.37 GB)
Used Dev Size : 102333440 (97.59 GiB 104.79 GB)
Raid Devices : 4
Total Devices : 6
Persistence : Superblock is persistent

Update Time : Thu Dec 23 11:55:01 2021
State : clean
Active Devices : 4
Working Devices : 6
Failed Devices : 0
Spare Devices : 2

Layout : left-symmetric
Chunk Size : 512K

Consistency Policy : resync

Name : qz-desktop:10
UUID : 9086174e:91b50e01:09a7fda1:eba8b0ad
Events : 1648

Number Major Minor RaidDevice State
0 259 23 0 active sync /dev/sdf16
1 259 24 1 active sync /dev/sdf17
3 259 25 2 active sync /dev/sdf18
4 8 7 3 active sync /dev/sda7

5 8 83 - spare /dev/sdf3
6 8 79 - spare /dev/sde15
qy@qy-desktop:~$


The device in question is not active part of the array , and still not mounted.
That is OK for now, but

I cannot mount the /dev/sde15
hence
I cannot access it - the Ubuntu "file manager " does not see it ...
gparted won't let me copy it because it is a member of raid5 array

My qustion is :
what would be most safest way to gain access to the /dev/sde15 ?

I was thinking of make the /dev/sde15 an "active memeber " of the array ,
not just a spare
but
I cannot find how to actually do it using mdadm.


Any help would be greatly appreciated

Cheers
 


Partially solved

mdadm --grow --raid-devices=6 /dev/md10

qy@qy-desktop:~$ sudo mdadm --detail /dev/md10
/dev/md10:
Version : 1.2
Creation Time : Sun Dec 19 13:28:26 2021
Raid Level : raid5
Array Size : 307000320 (292.78 GiB 314.37 GB)
Used Dev Size : 102333440 (97.59 GiB 104.79 GB)
Raid Devices : 6
Total Devices : 6
Persistence : Superblock is persistent

Update Time : Thu Dec 23 12:12:03 2021
State : active, reshaping
Active Devices : 6
Working Devices : 6
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 512K

Consistency Policy : resync

Reshape Status : 0% complete
Delta Devices : 2, (4->6)

Name : qz-desktop:10
UUID : 9086174e:91b50e01:09a7fda1:eba8b0ad
Events : 1668

Number Major Minor RaidDevice State
0 259 23 0 active sync /dev/sdf16
1 259 24 1 active sync /dev/sdf17
3 259 25 2 active sync /dev/sdf18
4 8 7 3 active sync /dev/sda7
5 8 83 4 active sync /dev/sdf3
6 8 79 5 active sync /dev/sde15
 
More .. just FYI

Looks as "dd" may copy the inaccessible device

sudo dd if=/dev/sde15 of=/dev/sdd6

Sure like to see the "dd" progress...
 
OK, I can mark the /dev/sde15 as "faulty".
Since it is a partition I cannot physically "remove" it - hence "mdadm remove " fails.
"gparted" and lsblk still marks it as a part of RAID array.
I need to remove that. l
 
With the dd command, at the end of your command, a space and then

Code:
status=progress

IIRC it may not go through to completion but it will give you a broad idea.

No idea on the RAID as I have not ever had to use it.

Wizard
 
I have decided to quit chasing this RAID problem.
Basically I should have copied the partition before adding it to the array.
CASE CLOSED
 
With the dd command, at the end of your command, a space and then

Code:
status=progress

IIRC it may not go through to completion but it will give you a broad idea.

No idea on the RAID as I have not ever had to use it.

Wizard
Thanks for your help , appreciate that very much.
 
Another way to view the progress is to use pv
Code:
sudo apt install pv
To use pv with the dd command follow the syntax:
Code:
dd if=/path/to/input | pv | dd of=/path/to/output
 
Quite so, here is an article which covers both.

https://www.cyberciti.biz/faq/linux-unix-dd-command-show-progress-while-coping/

But note that it says in part

Please note that if standard input is not a file and no size was given with the -s option, the progress bar cannot indicate how close to completion the transfer is, so it will just move left and right to indicate that data is moving. It will also show average MB/s rate

So neither method may necessarily be entirely complete.

Cheers

Wizard
 
Status
Not open for further replies.

Members online


Top