Any interests in Kernel 4.0 on My book live?

oh sorry, I got a bit confused with alphabetic and numeric order.
The nevest Kernel is perfect.

I was just plaing around with piping transmission trough vpn and was missing iptables for more comfort. :slightly_smiling:

KL you are my hero, I’ll test it right now.

Thank you very much.

Hi KL,

Thanks for creating this. My data volume (/dev/sda4) has 64k page size. Are there any ways to mount it without reformatting? I have a lot of files on there.

Thanks,
Faisal

On PC platforms you can’t mount ext4 volumes with >4KB block size.
But if you want read access only to get your files off a drive, you can install “fuseext2”
$ sudo apt-get install fuseext2
$ sudo fuseext2 -o ro -o sync_read /dev/sdb4 /mnt

Howto blog post here: http://john-hunt.com/2013/04/25/recovering-data-from-a-wd-mybook-live-2tb-3tbor-similar/

You may also able to copy data from the drive using “e2tools” without mounting it, but I haven’t tried.
I ended up formatting my new drive using 4KB block size, so it’s easier to mount on a PC (e.g. to restore the data from my failed/recovered old drive).

If your HD has not crashed like mine, you may consider to run a file system check using the original FW first (e.g. install original FW on one of the RAID 0/1 volumes and boot off it on the uboot command line) if the file system was not cleanly unmounted. But since these tools just read the drive, there is little risk in just trying…

Good luck with your recovery!
Ewald

Thanks for the reply Ewald. I’m trying to mount it in the MyBook enclosure (powerpc). I’m hoping there is a way to mount 64k block size there, as that’s how it came from the factory.

Yesterday I was able to test the e2tools and can now confirm that these work as well to recover files from a WD drive with 64K block size. The advantage of these tools is that you don’t need to mount the drive and that you can also use them to recover missing files from a WD image (extract rootfs.img from data.tar within e.g. apnc-024310-048-20150507.deb).
Example commando’s:
$ e2ls -l /dev/sdb1:/etc (list directory on WD root drive volume)
$ e2cp /home/rootfs.img:/etc/inittab /tmp/inittab (recover inittab file from WD image)

Regards,
Ewald

Thanks Ewald. I’m using fuse-ext2 to copy stuff off of it.

I’m only seeing about 20 MB/s . how did you format the data volume. i did a simple mkfs.ext4 /dev/sda4

For my 4TB drive:
mkfs.ext4 -b 16384 -i 65536 -m 0 /dev/sda4

but even with the standard block size=4K i get ~55MB/s while compiling a kernel on the same drive:
ETNas2:~# dd if=/dev/zero of=/root/test.dd bs=1M count=1K
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 19.8969 s, 54.0 MB/s

This is on the root partition which is formatted with 4KB. On /DataVolume (sda4) which is formatted as above, I get around 70MB/s write speed.
PS. This is running Linux kernel 4.3.4 with 16K page size which I compiled last night and which has SATA DMA disabled as I am rewriting some of the driver code.

Whow!! Nice!!

A while ago I have been looking at differences between stok kernel and WDC’s kernel. Never got so far to “transplant” the patch to a more recent kernel.

We seem to have used the same DTB source file. When I compare them there is one difference, which is the cpu name.
I also noticed we did not change the DTB header from canyonlands :smiley:

Would it be possible to get this driver into Debian and run stok Debian on the device?

The original patch had reached 100MB read and 70MB write before on 4.0 kernel,
Here is a last years test: Random Keystoke: Performance issue solved, mybook live kernel 4.0

If you are going to do some serious development, there is another device use the same CPU
https://forum.openwrt.org/viewtopic.php?id=45592
People might be interested in your work.

I retested it and now I’m getting good performance I again. Thanks for the support Ewald, and KL for creating this.

root@mfsnas:~# dd if=/dev/zero of=/DataVolume/test.dd bs=1M count=1K
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 15.5507 s, 69.0 MB/s
root@mfsnas:~# dd if=/DataVolume/test.dd of=/dev/null bs=1M count=1K
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 10.1522 s, 106 MB/s
root@mfsnas:~#

Yes, I am running both Wheezy and Jessie natively on MBL. As far as I can tell there are only 3 WD packages that are added to standard Debian (next to twonki/DLNA):

  • wd-lib_01.04.01-81092_all.deb
  • wd-nas_02.50.00-142897_powerpc.deb
  • webui_02.00.00-96242_all.deb
    With proper kernel support (e.g. WD led driver) these run on wheezy but I have not tried on jessie yet.
    Right now, the only configuration that is really stable is based on kernel 2.6.32.X. All 4.x kernel’s are unstable or perform poorly in comparison due to tens of bugs in 4.x kernel for PowerPC (e.g. DMA coherency, block alignment etc). For example, no chance to get Jumbo frames going on 4.X. It just hangs.
    Note that also the latest official WD firmware has several Jumbo packet bugs (e.g. MTU > 4060 will result in hangs after a while). I was able to fix a few defects in the latest 2.6.32.70 kernel/patch and so far the kernel seems stable and outperforms the official WD kernel. If this kernel survives stress tests running since last Friday, I will post a HOWTO on compiling 2.6.32.70 and a pre-build kernel similar to official WD kernel.

Network performance: netcat/nc now achieves up to 120MB/s which is at theoretical maximum for GE (MTU= 4080):
$ dd if=/dev/zero bs=1M count=1K | nc -vvn 192.168.1.6 12345
Connection to 192.168.1.6 12345 port [tcp/*] succeeded!
1024+0 records in
1024+0 records out
1073741824 bytes (1,1 GB) copied, 9,00472 s, 119 MB/s

Storage performance:
ETNas2:~# dd if=/dev/zero of=/shares/software/tst.dd bs=1M count=1K
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 13.0235 s, 82.4 MB/s

ETNas2:~# dd if=/shares/software/tst.dd of=/dev/null bs=1M count=1K
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 6.09765 s, 176 MB/s

Kernel Pagesize: 64K, Storage block size: 16K on sda4, 4K on sda1 (~35MB/s read).
NFS version 4.1 achieves over
Will also try with a kernel at 16K and 4K pages.

Disclaimer: installing any of these breaks WD warranty - don’t attempt unless you are familiar with Linux & Debian and have a valid reason (e.g. HDD died)

Ewald

Wow!
I am visiting this community after a gap of more than 8 months and just trying to skim through information.
Last year during April/ May I was looking for information on how I could upgrade my OpenVPN and OpenSSL to the latest versions from 2015.
Now I see some hope from this thread (though it may be a bit overwhelming for most users like me).

My WD MBL 2 TB has about 1.3 TB of data (mostly videos/ movies) - since I use this drive primarily as my download machine.

I do not have a Linux machine around and the ‘block size’ related discussion above prompts me to think that all of the above is not going to be easy.

For now: Is there a simpler (pre-compiled package) available which will update OpenVPN and OpenSSL to a relatively newer version?

The SoC’s DMA code hasn’t change much since 2.6.32, and SATA, Ethernet has its own DMA controller, shouldn’t be a problem. You can compile and run 4.1.x kernel with 64K page size with additional kernel CONFIG_CONSISTENT_SIZE=0x00A00000. The memory usage increases around 50% when booting a clean Debian Jessie compare with 16K page size, while the 4K page size performance is very poor.

The hardware crypto do have problem in newer kernel, might need some fix.

Hi mr KL,

Can you help us a bit more to use your good work?
Can you compile with the current kernel 4.1.20 and build a disk image which we can restore on our hard drive?

Thanks,
Joost

64K page size Jessie image, root password is password.

md5: dba84e74f97a4b668cfa1d4d75a2200f

Memory footprint is almost doubled compare with 16K page size.
You can try run some benchmark, disk I/O seems boost some with bigger page size.

Thank you very much! I will try to install the image.

Hey guys,

Linux newbie here. I’ve been tinkering with my MBL and managed to brick about 10 times or so! :joy:
I haven’t tried to upgrade to Jessie with 4.* kernel because I’m afraid it will perform poorly, but I really wanted to install ownCloud and some other stuff.
Could someone please (!!!) make a dumber’s guide on how to install @kl_yang’s image? All I have to do is partition and format following schwabenlan.de’s guide and then unpack Jessie image on it?

Would it be possible to install OpenMediaVault afterwards?

The raw network performance without jambo frame is around 600Mbps on Gigabyte Switch, since there is no hardware crypto driver, SSH is around 8MB/s. disk performance is around 50~60MB/s. My box has uptime with a recent 4.1.x kernel for more than 40 days. ownCloud works fine, not tried OpenMediaVault.

If you have cracked open the case and get the hard drive out, just follow the README here should be OK.

1 Like

@kl_yang, thanks for your reply mate.
Yeah, I have my MBL open.
I did read your README before posting and I still have the same doubt. I should format sd*1 to ext2, right? All the other partitions should be left untouched? I’d appreciate If you could help me a little more on this. :slight_smile:

Thanks again.