WD Community

MyCloudEX4 - No Auto or manual Rebuild available

Hi, and apologies if this has been covered before. I’m desperately in need of some help.

I recently had a disk fail in drive bay 4 of my MyCloudEX4 and upon trying to rebuild it, it failed.

So I purchased a new drive and after following all the steps, the option to rebuild is not there either automatically or manually.

I did read some posts somewhere that this can be resolved by ssh using the mdadm command.

So, I followed an old post here from 2014 which got me this far.

mdadm --detail /dev/md0

Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
3 0 0 3 removed

I have no idea how to make the last disk go from removed back into the array and would appreciate if someone would assist me with it please. There is a lot of data on my device and I’m not wanting to lose any of it.

I appreciate the help in advance and thank you.

Wrong forum… but whatever.
Provide output of blkid and df -h please.

1 Like

Sorry for wrong Forum - I realised and tried to move it - here is blkid output …

/dev/ubi1_0: UUID=“ba040a60-b9d6-4155-a63b-36171e4b63f4” TYPE=“ubifs”
/dev/ubi0_0: UUID=“4ddd54f7-137c-486b-b1f0-352ac4fbace5” TYPE=“ubifs”
/dev/loop0: TYPE=“squashfs”
/dev/sda1: UUID=“ddfc521a-a490-3caa-4a4d-9e2348a02ae9” TYPE=“linux_raid_member” PARTLABEL=“Linux swap” PARTUUID=“9b43b027-b501-4be9-b478-7cddd82bf7c0”
/dev/sda2: UUID=“22bc27b2-ae2a-7d6a-cefb-821fc2a62e45” UUID_SUB=“a83a1182-9877-2dfc-b07c-535eebdef96c” LABEL=“1” TYPE=“linux_raid_member” PARTLABEL=“Microsoft basic data” PARTUUID=“a29be0a6-a9fd-4940-a485-e19fc80255a4”
/dev/sda4: UUID=“913873b2-7fe5-4435-8eb8-04c1ef23ffae” TYPE=“ext4”
/dev/sdb1: UUID=“ddfc521a-a490-3caa-4a4d-9e2348a02ae9” TYPE=“linux_raid_member” PARTLABEL=“Linux swap” PARTUUID=“e7154977-deab-41f9-853b-c9f67d28ccf5”
/dev/sdb2: UUID=“22bc27b2-ae2a-7d6a-cefb-821fc2a62e45” UUID_SUB=“653e5219-1cb7-bbfa-db41-715976613b79” LABEL=“1” TYPE=“linux_raid_member” PARTLABEL=“Linux/Windows data” PARTUUID=“aa15ef0e-06de-4e8c-bc3c-b8e6a987632d”
/dev/sdb4: UUID=“dfa04d67-68b2-4f8f-a4ac-e63173377206” TYPE=“ext4”
/dev/sdc1: UUID=“ddfc521a-a490-3caa-4a4d-9e2348a02ae9” TYPE=“linux_raid_member” PARTLABEL=“Linux swap” PARTUUID=“4745fc59-e3e4-4f9d-aff8-489afe08bc8f”
/dev/sdc2: UUID=“22bc27b2-ae2a-7d6a-cefb-821fc2a62e45” UUID_SUB=“12eaae72-78fe-f5e1-9e29-f803d75a253c” LABEL=“1” TYPE=“linux_raid_member” PARTLABEL=“Linux/Windows data” PARTUUID=“f57e98ee-1c88-4444-bc8d-ed4497a0c982”
/dev/sdc4: UUID=“7e52bd56-cb5b-4dbb-887c-4f07c63160a8” TYPE=“ext4”
/dev/md0: UUID=“8e74eaa7-c32b-4681-9246-9baa85652037” TYPE=“swap”
/dev/md1: UUID=“078afd99-77d1-45fe-be83-39749b1d363f” TYPE=“ext4”

and df - h

Filesystem Size Used Available Use% Mounted on
%root% 54.2M 30.1M 21.3M 59% /
/dev/ram0 54.2M 30.1M 21.3M 59% /
mdev 251.6M 32.0K 251.6M 0% /dev
cgroup_root 251.6M 0 251.6M 0% /cgroup
ubi0:config 12.2M 552.0K 11.0M 5% /usr/local/config
/usr/local/tmp/image.cfs
102.6M 102.6M 0 100% /usr/local/modules
tmpfs 1.0M 0 1.0M 0% /mnt
tmpfs 40.0M 4.2M 35.8M 11% /var/log
tmpfs 100.0M 5.8M 94.3M 6% /tmp
/dev/sda4 944.9M 18.5M 926.4M 2% /mnt/HD_a4
/dev/sdb4 944.9M 27.2M 917.7M 3% /mnt/HD_b4
/dev/sdc4 944.9M 17.3M 927.6M 2% /mnt/HD_c4
/dev/md1 16.3T 8.3T 7.8T 52% /mnt/HD/HD_a2

And this

ls /dev/sdd*

The new disk /dev/sdd needs 4 partitions with GPT and then it needs to add the partitions to the 3 arrays.
I’ll have a look when I find a bit of time… there should be a WD script to do all of it at once.

1 Like

ls /dev/sdd*

just shows (in magenta)

/dev/sdd


There’s a post elsewhere on this forum that suggest this - but I don’t want to do it to ‘zero’ the new disk…

dd if=/dev/zero of=/dev/sdb2 (clean the disk, I’m not find fdisk command on WDEx4)

I’m not sure about /dev/sdb2 and whether or not it’s an active part of the array or not.

Luckily you didn’t use that command yet. It would destroy your array.

EDIT:
You have 4 disks, /dev/sda, sdb, sdc, sdd. Mdadm showed that sda, sdb, sdc are currently in use, so disk sdd is the missing member.
The blkid command shows that you have 2 arrays: md0 (swap) and md1 (all your precious data).
The ls (let see) showed that there’s no partition table on /dev/sdd yet.
Please add some extra info your data array.

mdadm --detail /dev/md1
cat /proc/mdstat
1 Like

Yes, I thought so… I tried extending the raid and adding the extra disk, but that fails with format error. :s

mdadm --detail /dev/md1 Shows this…

/dev/md1:
Version : 01.00.03
Creation Time : Thu Jul 30 05:39:55 2015
Raid Level : raid5
Array Size : 17568979392 (16755.08 GiB 17990.63 GB)
Device Size : 11712652928
Raid Devices : 4
Total Devices : 3
Preferred Minor : 1
Persistence : Superblock is persistent

Intent Bitmap : Internal

Update Time : Wed Aug 29 12:53:39 2018
      State : active, degraded

Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

     Layout : left-symmetric
 Chunk Size : 64K

       Name : 1
       UUID : 22bc27b2:ae2a7d6a:cefb821f:c2a62e45
     Events : 101467

Number   Major   Minor   RaidDevice State
   4       8        2        0      active sync   /dev/sda2
   1       8       18        1      active sync   /dev/sdb2
   2       8       34        2      active sync   /dev/sdc2
   3       0        0        3      removed

cat /proc/mdstat shows…

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md1 : active raid5 sda2[4] sdc2[2] sdb2[1]
17568979392 blocks super 1.0 level 5, 64k chunk, algorithm 2 [4/3] [UUU_]
bitmap: 2/2 pages [64KB], 262144KB chunk

md0 : active raid1 sdc1[2] sdb1[1] sda1[0]
2097088 blocks [4/3] [UUU_]
bitmap: 3/16 pages [96KB], 8KB chunk

Looks like it’s gone from bad to worse now. I read somewhere that doing a ‘system’ only reset would fix this issue (so I backed up my settings first). Now the device shows that there is no raid array present at all and

mdadm --detail /dev/md1

shows
mdadm: cannot open /dev/md1: No such file or directory.
I’m really feeling sick now (literally) as I tried restoring the settings to no avail.

I’ll probably just have to live with it now :frowning:

Don’t panic yet.
I didn’t find the restore script right away so please be patient and try not to break it any further :slight_smile:

Feel free to call support as they have more experience on this domain.

Please show cat /proc/mdstat once more.
We’ll probably have to assemble the raid. See How to assemble a specific RAID array without using /etc/mdadm.conf - Unix & Linux Stack Exchange
Do not CREATE a new array, the data will be gone.

mdadm --assemble /dev/md1 --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45

And your data will be back (though still degraded)

1 Like

cat /proc/mdstat shows this…

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md0 : active raid1 sdc1[2] sdb1[1] sda1[0]
2097088 blocks [4/3] [UUU_]
bitmap: 0/16 pages [0KB], 8KB chunk

md1 appears to be gone… however…

mdadm --examine --scan shows this…

ARRAY /dev/md0 level=raid1 num-devices=4 UUID=6effa0e9:bc0053b5:b8b7e65b:2ebba3d6
ARRAY /dev/md/1 level=raid5 metadata=1 num-devices=4 UUID=22bc27b2:ae2a7d6a:cefb821f:c2a62e45 name=1

What is the partition table of /dev/sda

gdisk /dev/sda
p    # print
x    # quit without writing anything

I’d want to use sgdisk to do this but you’ve only got gdisk available.
Feel free to download entware at wdcommunity.com and install it with

/opt/bin/opkg install sgdisk
1 Like

mdadm --assemble /dev/md1 --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45
mdadm: error opening /dev/md1: No such file or directory

looks like /dev/md1 doesn’t exist

Command (? for help): p
Disk /dev/sda: 11721045168 sectors, 5.5 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7E7357D0-ACD1-4CC5-A666-EC81DEE8179A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 11721045134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
1 2048 4196351 2.0 GiB 8200 Linux swap
2 6293504 11718946815 5.5 TiB 0700 Microsoft basic data
3 11718946816 11721045134 1.0 GiB 0700 Microsoft basic data
4 4196352 6293503 1024.0 MiB 0700 Microsoft basic data

nevermind the /dev/md1, just use

mdadm --assemble --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45
1 Like

mdadm --assemble --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45
mdadm: an md device must be given in this mode

and

mdadm --assemble --scan --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45
1 Like

root@MyCloudEX4 /etc # mdadm --assemble --scan --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45
mdadm: No arrays found in config file
root@MyCloudEX4 /etc #

I believe there is a typo in the WD software causing this.

ARRAY /dev/md0 level=raid1 num-devices=4 UUID=6effa0e9:bc0053b5:b8b7e65b:2ebba3d6
ARRAY /dev/md/1 level=raid5 metadata=1 num-devices=4 UUID=22bc27b2:ae2a7d6a:cefb821f:c2a62e45 name=1

Do you see the weird /dev/md/1?
Try

mdadm --examine --scan >> /etc/mdadm/mdadm.conf

Edit this file to be md1 instead of md/1
Then try to assemble again

Or try to assemble with /dev/md/1

1 Like

I did notice that alright, but I didn’t put it there… I edited the conf file and it appears that /dev/md1 doesn’t exist.

root@MyCloudEX4 /etc # mdadm --assemble --scan --uuid 22bc27b2:ae2a7d6a:cefb821f
:c2a62e45
mdadm: error opening /dev/md1: No such file or directory
root@MyCloudEX4 /etc #

Try

mdadm --assemble --run /dev/md1 --uuid xxxxxxxx /dev/sda2 /dev/sdb2 /dev/sdc2

This should start the array even while it knows it’s incomplete

1 Like

root@MyCloudEX4 /etc # mdadm --assemble --run /dev/md1 --uuid 22bc27b2:ae2a7d6a:
cefb821f:c2a62e45 /dev/sda2 /dev/sdb2 /dev/sdc2mdadm --assemble --run /dev/md1 /
dev/sda2 /dev/sdb2 /dev/sdc2
mdadm: error opening /dev/md1: No such file or directory
root@MyCloudEX4 /etc #

Still no joy ( I appreciate your persistence by the way (more than you can imagine)). (I’ve also ran out of replies) - mknod /dev/md1 b 9 1 ← do I need to do that?

****** Not sure if you’ll see this but I tried what you posted after this and I get the same - no such folder exists…
mdadm --assemble --run /dev/md/1 --uuid 22bc27b2:ae2a7d6a:cefb821f:c2a62e45 /dev/sda2 /dev/sdb2 /dev/sdc2

I’ll reboot now

You have to keep checking back here for edits - I’ve ran out of replies :frowning:

Hope you see this - I managed to get the /dev/m1 back… but it doesn’t seem persistent… - ie when I reboot it goes again… I used that mknod cmdlet above to make that /dev/m1 available and the array shows, but I need to make it persistent now.

Support for Western Digital Hard Drives | Western Digital

Still Need Help?

Reach out to Support for more assistance.

Sign in to Your Support Account

Get up-to-date information about your products.

Western Digital Business Portal

Unlock benefits and tools for your business such as enterprise support, pricing and rebate tools, marketing, loyalty, rewards, and more.