[GUIDE] Debrick a MyBookLive DUO

Hello . i use the guide 2 to setup MBLD,new empty drives,i only install A drives ,and put it back.

after restore the factory settings (quick and full all tryied),but there still have a smart fail error message .

i search some meeage on the forums, is this caused by samrt diable ? i use smartctl -s on … to enable the /dev/sda and /dev/sdb…is this correct? the script can’t auto enbale the drives samrt?

i found the script can’t format the /dev/sda4…after install and  full factory restore. use SSH back to check the drives,

i use “parted” to check is drives partition is ready…sda4 still don’t have the file system(should be ext4?) please help to check ,is this normal? after i rebuild the raid1.then go normal as below

Number Start End Size File system Name Flags
3 15.7MB 528MB 513MB linux-swap(v1) primary raid
1 528MB 2576MB 2048MB ext3 primary raid
2 2576MB 4624MB 2048MB ext3 primary raid
4 4624MB 2000GB 1996GB ext4 primary raid

stevevev wrote:

i search some meeage on the forums, is this caused by samrt diable ?

Yes

 

i use smartctl -s on … to enable the /dev/sda and /dev/sdb…is this correct?

Yes

 

The script can’t auto enbale the drives samrt?

The OS should be enabling this by itself on boot. I have seen this reported a few times by people who used a similar debrick script on the single drive MBL. Not sure why this happens to a very small amount of people

 

i found the script can’t format the /dev/sda4

The script should create an EXT4 filesystem to your DataVolume partition without issue

mkfs.ext4 -b 65536 -m 0 $diskData

 

i use “parted” to check is drives partition is ready…sda4 still don’t have the file system(should be ext4?)

Yes EXT4 is correct for sda4 and sdb4

 

please help to check ,is this normal?

No as the script specifically creates an EXT4 filesystem to that partition

mklabel gpt
mkpart primary 4624M -1M
set 4 raid on
quit

mkfs.ext4 -b 65536 -m 0 $diskData

 

Were the drives formatted to any filesystem prior to running the debrick script? I’m wondering if the script has trouble creating the EXT4 filesystem on the DataVolume because it is a RAW partition? With the single drive, it has been suggested to format the drive to ANY filesystem and then delete all partitions so all you are left with is UNALLOCATED space.

 

After i rebuild the raid1.then go normal as below

Number Start End Size File system Name Flags
3 15.7MB 528MB 513MB linux-swap(v1) primary raid
1 528MB 2576MB 2048MB ext3 primary raid
2 2576MB 4624MB 2048MB ext3 primary raid
4 4624MB 2000GB 1996GB ext4 primary raid

Yes this looks perfect if you have a 4TB MBLDUO

 

By the looks of things, you are back up and running now. Are there any changes I need to make to the guide?

Please try to be specific as possible as I don’t own a MBLDUO so can’t reproduce your steps

Thanks :slight_smile:

First of all I would like to thank nfodiz for a great guide! You are doing a great job and helping lots of people!

Here are the results of installing fresh OS on two empty drives on MBLD. I will try to describe all steps in detail. This may be helpful for people who don’t have advanced technical knowledge. And I want to apologize for my bad English beforehand!

During preparation I did everything like nfodiz wrote except two things. I didn’t use Download SystemRescueCd, because I have only two SATA cables in my PC. I used USB thumb drive formatted to FAT32 with Linux Live CD (version Ubuntu 12.10 ) instead of it. If somebody is interested how to create one then you can check this link: http://www.linuxliveusb.com/

And I didn’t use USB thumb drive to copy “debrick.sh” and “rootfs.img” to it. I just put those two files in a folder on my hard drive with Windows and I could later access that folder from Linux and mount it from terminal. Be careful when you do this, because as nfodiz mentioned before if you mess up drive letters in Linux terminal you can erase your hard drive with Windows by accident.

So I had two clean hard drives 3 TB each without file system (space unallocated on both). I connected them one by one to my PC via SATA and each time booted into Linux from thumb drive. (For those who don’t know you must access your PC’s BIOS first and change boot setup order to boot from USB not from your hard drive with Windows.

Connect first hard drive to PC via SATA, boot into Linux from thumb drive (select Try Ubuntu, not Install Ubuntu!) and check in terminal which drive is assigned to which letter with the following command:

 

sudo fdisk –l

My drive with Windows was /dev/sda, so I typed:

sudo mount /dev/sda1

And it showed me that it is already mounted. After this I mounted folder with debrick.sh" and “rootfs.img”. 

Now you will have to install mdadm package, because it is not installed on Live CD.

sudo apt-get install mdadm

When it is was installed I typed (Because my empty hard drive was assigned to /dev/sdb. Attention! Your hard drive can be assigned to a different letter! For example: /dev/sdc or /dev/sdd):

./debrick.sh rootfs.img /dev/sdb destroy

After debrick process is completed you shut down PC, disconnect the first hard drive, connect the second hard drive and repeat everything (you will even have to install even mdadm package again).

When hard drives were ready I placed only one of them into MBLD and booted it for test (Don’t forget to switch of the power cable when you connect or disconnect hard drives from MBLD!). LED on MBLD was red, but I could access its dashboard. Drive status in dashboard was “Bad”. RAID and status of both hard drives was shown as failed in storage. NB I was offered to upgrade to the latest (which is currently 02.41.05)  automatically, but I canceled it. You will be offered to upgrade firmware each time you enter MBLD dashboard, but I don’t advise you to do it unless the drive is 100% ready. So I did a quick factory restore via dashboard, but nothing changed after reboot.

After this I placed both hard drives into MBLD and booted it. The LED was still red. I was still able to access dashboard. I did a quick factory restore via dashboard again. Now the LED wasn’t red anymore. It was yellow and I could access dashboard and drive status there was shown as “initializing”. Soon LED became green.
After this I connected to MBLD via PuTTY and typed:

mdadm --create -e 0 --verbose /dev/md2 --level=raid1 --raid-devices=2 /dev/sda3 /dev/sdb3
reboot

(mkswap /dev/md2  wasn’t created in the beginning)

After MBLD rebooted I connected to MBLD via Putty again and typed:

mkswap /dev/md2
reboot

Now after new reboot when I typed in PuTTY:

swapon –s

And got the following output (only Used had a different value):

Filename  Type  Size Used Priority
/dev/md2    partition 500544 896 -1

Everything seemed to work, but when I tried to do a short diagnostic test I got the following message: Internal server error. Retry your last operation if the error persists, contact WD Support for assistance. Drive status in dashboard became “Bad”, LED  color became red and I got alert that drive SMART check failed.

I found the following thread how to enable support on My Book Live. Thanks to nfodiz again for provided solution!
http://community.wdc.com/t5/My-Book-Live/Enabling-S-M-A-R-T-support-on-WD-My-Book-Live/td-p/548280

So I typed the following commands in PuTTY:

smartctl -s on /dev/sda
smartctl -s on /dev/sdb
reboot

After reboot I was able to complete quick diagnostic test. Drive status in dashboard became “Good” and LED green! Btw the drive is in striped mode (RAID 0) at the moment. So I guess it is setting RAID 0 by default as written in its manual.

It seems that MBLD is working fine now. I can access dashboard and MBLD shares via LAN.

In addition, please check the output from ‘parted’ command below:

MyBookLiveDuo:~# parted

GNU Parted 2.2
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA WDC WD30EZRX-00A (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End          Size          File system        Name     Flags
 3             15.7MB   528MB    513MB     linux-swap(v1)  primary  raid
 1             528MB    2576MB  2048MB  ext3                     primary  raid
 2             2576MB  4624MB  2048MB  ext3                     primary  raid
 4             4624MB  3001GB  2996GB                               primary  raid

Thanks!

2 Likes

@Herokolco Thanks for the great write up. Yes it is concerning that the filesystem isn’t showing properly in parted. It should definitely be showing as an EXT4 raid partition. Stevevev was having the exact same problem as you and he rebuilt as raid 1 and now it is showing properly. Hopefully someone with some more linux knowledge than me can chime in on why this happens.

It appears I need to update guide 2 with the commands to enable smart?

Thanks again for your detailed post :slight_smile:

@ Herokolco

What do you get for output from this command from PuTTY for /dev/md3 under the Type column

df -T

I put RAID to rebuild from 0 to 1 in MBLD dashboard and it is still rebuilding. I will check df -T output for /dev/md3 as soon as rebuild will be finished.

Yes, it seems you have to update guide with two SMART commands.

I have few more questions. Every time I entered MBLD dahboard I was offered to update firmware to the latest version, but I refused every time. Is it secure to update it?

Is it possible to format partition 4 to ext4 file system manually?

Thanks!

I have a copy of the partitions layout of a virgin MBLD from the mybookworldwiki MBLD virgin backup images. The drive ships in spanning and this information was pulled from a virgin drive.

So we may be ok afterall…(unless someone runnning spanning comes in and says otherwise)  It appears that when the drive is in spanning it doesn’t show the EXT4 filesystem in parted

(parted) unit b                                                           
(parted) print  

Model: ATA WDC WD30EZRS-00J (scsi)
Disk /dev/sda: 3000592982016B
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
 3 15728640B 528482303B 512753664B primary raid
 1 528482304B 2576351231B 2047868928B ext3 primary raid
 2 2576351232B 4624220159B 2047868928B ext3 primary raid
 4 4624220160B 3000592498687B 2995968278528B primary raid


(parted) print                                                            
Model: ATA WDC WD30EZRS-00J (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
 3 15.7MB 528MB 513MB primary raid
 1 528MB 2576MB 2048MB ext3 primary raid
 2 2576MB 4624MB 2048MB ext3 primary raid
 4 4624MB 3001GB 2996GB primary raid

Ok, rebuild to RAID 1 has finally finished! Everything seems to work fine. Here is the output from parted.

MyBookLiveDuo:~# parted
GNU Parted 2.2
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA WDC WD30EZRX-00A (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End         Size         File system        Name     Flags
 3             15.7MB   528MB    513MB    linux-swap(v1)  primary  raid
 1             528MB    2576MB  2048MB  ext3                     primary  raid
 2             2576MB  4624MB  2048MB  ext3                     primary  raid
 4             4624MB  3001GB  2996GB  ext4                     primary  raid

So we can see EXT4 filsystem in partition table again. I am going to rebuild MBLD back to RAID 0 now to be 200% sure and will post output from parted for RAID 0 later.

nfodiz, I remember you said you were not sure if RAW hard disks can be used to write on them MBLD OS. In fact one of the hard disks I used was RAW, because I had written it with zeros (full version) using Data Lifeguard Diagnostic before installing OS on it.

1 Like

Wow! Rebuild back to RAID 0 has finished in 10 minutes. Everything seems to be working fine. The output of parted is the same as it was before. No EXT4 filesystem detected again.

MyBookLiveDuo:~# parted

GNU Parted 2.2
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA WDC WD30EZRX-00A (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End          Size          File system        Name     Flags
 3             15.7MB   528MB    513MB     linux-swap(v1)   primary  raid
 1             528MB    2576MB  2048MB  ext3                      primary  raid
 2             2576MB  4624MB  2048MB  ext3                      primary  raid
 4             4624MB  3001GB  2996GB                               primary  raid

We can see linux-swap(v1) here, but it is not present on the output of parted from virgin MBLD posted by nfodiz. Weird things happen here hehe.

Here below is the output from df -T

MyBookLiveDuo:~# df -T
Filesystem     Type        1K-blocks      Used        Available       Use%    Mounted on
/dev/md0         ext3         1968336       577020    1291328        31%       /
tmpfs                tmpfs       51200               0           51200             0%        /lib/init/rw
udev                  tmpfs       10240           1280        8960               13%      /dev
tmpfs                tmpfs       51200               0           51200             0%        /dev/shm
tmpfs                tmpfs       51200            4032       47168             8%         /tmp
ramlog-tmpfs tmpfs       20480             2560       17920             13%       /var/log
/dev/md3          ext4       5828537152   2132160 5826404992  1%        /DataVolume

Anyway MBLD is working fine and I am more than happy! Thank you nfodiz!

1 Like

Your welcome :slight_smile: I am gonna assume that under spanning the filesysyem won’t show for sda4 using parted and that everything is on the up and up for now.

The raid array /dev/md3 shows as ext4 so everything should be fine in spanning mode
Oh and for some reason gparted and parted on the System Rescue CD never shows the linux-swap(v1) label either

Thanks for the testing Herokolco

I have a confirmation from Chaos311 that parted looks like this on a factory MBLD in SPAN

So don’t be concerned that parted doesn’t show EXT4 under Filesystem for sda4 or sdb4

Number Start End Size File system Name Flags

 3 15.7MB 528MB 513MB linux-swap(v1) primary raid
 1 528MB 2576MB 2048MB ext3 primary raid
 2 2576MB 4624MB 2048MB ext3 primary raid
 4 4624MB 4001GB 3996GB primary raid

 Thanks again Chaos311 :slight_smile:

Awesome work with the guide, I’m in the middle of debricking, and so far so good.

I’m running raid 0 as well, and yep ext4 wasn’t listed.

Did Chaos311 mention whether he had to recreate the array in raid 0? debrick.sh completed, and I’ve got the drives plugged in. The status light is blinking green so sounds like the array is rebuilding. Not sure if I should’ve run mdadm --create before plugging in, or after the mbld finishes rebuilding the array. Any pointers?

Did Chaos311 mention whether he had to recreate the array in raid 0?
Chaos311 didn’t use the guide to debrick, his MBLDUO is still in it’s original factory state. He just simply let me know that in Spanning mode the drive does not show EXT4 filesystem in parted for the data partition.

Not sure if I should’ve run mdadm --create before plugging in, or after the mbld finishes rebuilding the array. Any pointers?
This is still unknown, but my guess is that the drive will rebuild a span by itself. If that’s the case you won’t have to run the mdadm command at all. If you did have to run the command though, it would be AFTER you put the drives back in the enclosure and powered them up. You should be able to check the drive status from the dashboard to see if it’s rebuilding.

I am assuming you followed Guide 1?

Please let me know if spanning rebuilt by itself and I will edit the guide to reflect the change :slight_smile:

TIA

1 Like

Wow, good to see the dashboard working again. Slowly getting there!

The status at the bottom reads Status:Bad in red, which doesn’t sound healthy, and hovering over it tells me “Drive SMART failure.” Also, the status light is flashing red   :confounded:

On the plus side I can see the files from the public share. I couldn’t pull them off to back up using Linux Reader or R-Linux, so I went ahead without backing up. Guess this was because it’s in raid 0.

Do you think it’s okay if I back them up now while the drive is busy/bad?

Which guide are you following, and what steps have you done so far?

Oh, just read through Herokolco’s guide. Creating a System Report from the dashboard also tells me that Smart support is disabled. Tried to ssh to the drive to try  smartctl, but I get a connection refused error.

 

And yep, I was using Guide 1. I’m at Step 5, where I’ve put the drive back into the mbld and letting it rebuild. It’s doing that for 4 hours now.

You might need to enable ssh from the dashboard
your mybooklive network name or ip/UI/ssh

Once enabled try to SSH in again and type the command
mount

Post the output here

Then enable smart with
smartctl -s on /dev/sda
smartctl -s on /dev/sdb

ssh was on, but it was a user error - I used its old ip address!

Smart is now enabled. I ran smartctl -a /dev/sda, and it says the self-assessment test passed.

Herokolco said he rebooted and ran a diagnostic test from the dashboard after enabling Smart, and after that the light went green. He said his RAID0 rebuild only took 10 minutes, which is how long my mbld took before flashing red (it started off flashing green). Maybe RAID0 rebuilds only take 10 minutes?

I have a feeling my rebuild was successful and I can reboot as well to get the light green. I’ll probably do that tomorrow (it’s 1am over here) just in case the rebuild hasn’t finished.

Thanks for your prompt responses, your guide is a lifesaver! I’ll let you know how I go tomorrow.

Please do and just as a note, you can check the status of the rebuild by going to the dashboard and going to Storage Settings

 

It will tell you the % complete on the array rebuild

Okay, I can now confirm, Guide 1 debricked my RAID0 mbld!! Just did a reboot and it got the drive to go green.

A couple of points to note:-

  • Backing up with Linux Reader and R-linux doesn’t seem to work if your RAID0 is busted as much as mine was. I tried an mdadm create/assemble to try and get the data but it didn’t work.

  • The debrick.sh script caused my computer to restart a couple of times before completing. It failed at the line:-

    dd if=$image_img of=$rootfsRaid

       I put in a couple of extra echoes and did a wait for 20 seconds just before the dd line to try and debug the issue.

       When I ran it that time it worked successfully. Don’t know if the wait helped, or if it’s just flaky.

  • I also had to re-add the users that had been removed. Re-adding them restored the access to the users and shares. You’ve got that point about the shares at the bottom of the guide, but you may want to add in that users can be re-added the same way.

  • There was also that additional stuff that you’ve helped me with (rebuild status, smartctl), but I see you’ve already added that.

Once again, I can’t thank you guys enough for all of the hard work you put into this guide, and to nfodiz for replying to my posts. Keep up the good work!!