Open Media Vault on Western Digital My Book Live

  • Hi,


    I've been spending the last couple of days trying to get OMV to run on the WD My Book Live. The reason I did this is because WD is no longer updating this drive, resulting in outdated software packages and complimentary security issues. Device specs: 800 MHZ PowerPC CPU and 256 MB ram.


    In this topic I will list my findings and questions. I hope that other people can benefit from my journey as I was unable to find any good resources for this combination of hardware and software.


    High level steps
    First you need to get rid of WD's custom OS; they made so many changes that it doesn't allow you to install new packages without breaking the device in the process.
    1) Follow this guide to get a clean debian system on your MBL. Credits to Martin for making such a comprehensive write-up of the process!
    At the time of writing, the sources.list in the write-up state "stable". Make sure that you change it to "wheezy", otherwise the installed version will be Jessie! (There is no MBL/APM82181 driver for Jessie and OMV doesn't run on Jessie yet)


    Since the MBL is running on a PowerPC board, there is no deb package on the repo to install it. This means that you have to install and compile some of it yourself.
    2) Follow this guide to get OMV running on your MBL.


    Q: I'm hoping that Volker will be kind enough to add the PowerPC architecture to the repo's, as this will make things much easier on the installation part.


    OMV testing
    Date and time
    Since the MBL doesn't have a bios battery, it will lose track of time as soon as you power it off.
    Setting date and time in the config page seems sketchy. Setting it to obtain time via ntp doesn't seem to work unless I manually set the date and time close to the actual setting, saving, selecting ntp updates and saving again.


    Notifications
    I've set up notifications using a free google account with authenticated SMTP relay. Make sure you set the port to 587 instead of 465 that google's guide is saying. I'm getting a ton of notifications now (too many really), which I will elaborate later.


    Q: I'm wondering how I should have set up postfix for this as it is soaking up 9% of the MBL's ram. I've selected "Internet Site" during postfix installation, resulting in this chunk of memory use. If I setup postfix as "no mail", will the notifications part of the OMV suite still work (and lower the memory usage)?


    Power management
    I've turned on "Specifies whether to monitor the system status and select the most appropriate CPU level."


    Q: However, I doubt that this option has any use on this PowerPC system. Since it is already a low power system, it doesn't really make sense to do power management by CPU throttling?


    Monitoring
    I briefly mentioned being bombarded with notifications earlier. As soon as I turn on monitoring, my mailbox is flooded with nagging (and memory use rockets to 126MB, compared to 107MB without monitoring). Seems rrd and collectd are resource hogs for this kind of system.


    Resource warnings


    I pretty much get these messages non stop. Can't seem to change the values in the webgui, so I need to delve deeper into the config files there. (And hope they don't get overwritten during service restart)


    Degraded raid array
    mdadm also reminds me every half hour that my raid array is broken.


    While mdadm is right, I don't need it to tell me because I did this on purpose. sda1 and sda2 are part of a raid array that WD uses in their firmware update process. They remove one partition from the raid, update on that partition, and if the update went well, they restore the raid array and reboot.
    OMV is installed on sda1, WD's OS is still on sda2. If I ever wanted to go back to WD's stuff, I simply add sda1 back to the array and sync it.


    Q: How do I turn these messages off?
    Q: Since no raid functions are needed on the MBL, can I install OMV without RAID support (mdadm) at all?


    Drive space


    I had to install a ton of tools to compile the missing PowerPC components. I could remove those tools, but i'd need them again to do the compilation if a newer version of OMV is released. Unless the PowerPC version of OMV is added to the repo :)


    As I'm writing this, I've received about 22 emails about resources, degraded arrays, drive space and other things. Turning monitoring off again...


    Update manager
    The update manager throws an error:
    The index of upgradeable packages does not exist. Please re-synchronize the package index files from their sources.
    In particular this message is of interest, but it is to be expected:
    Unable to find expected entry 'main/binary-powerpc/Packages' in Release file


    Plugin manager
    The same issue as with the update manager is encountered in the plugin manager section.


    Physical disks
    I've configured the disk (WDC WD30EZRS-11J) as:
    Advanced power management: 1 - Minimum power usage with standby (spindown)
    Acoustic Management: Disabled
    Spindown time: 30 minutes
    Write cache: off.


    Q: Will turning drive-cache on have any effect? Found the answer myself: works wonders. Turned off throughput speed in Samba shares is about 3MB/sec write. Turned on: 50 MB/sec.
    (I'm guessing it is the disk's internal ram buffer, but I'm not sure. As I feel this is a potentially dangerous option, I've decided not to touch it yet.)
    Q: The drive doesn't spin down at all. Does anyone have an idea how to fix it?
    Q: OMV is installed on sda1 and there is only one drive. I'm guessing that's the reason why it won't spin down. WD's firmware has a ramdrive of a couple of MB to store /var/log and other files that require frequent reads/writes. Every night at 3 am, a cronjob rotates these logfiles to the drive so it can remain in standby most of the time. Perhaps we can come up with something similar?


    S.M.A.R.T.
    I've left S.M.A.R.T. disabled as I'm unsure what good it does. If I enabled it, I would choose Power Mode: Standby to prevent the disk from spinning up. However, the disk doesn't spin down at all.
    The devices tab shows the disk and the temperature (59 degrees celcius now). I can edit the drive and select "Activate S.M.A.R.T. monitoring", but I think it won't work if the service is not enabled in the settings tab.


    Any advice is welcomed.


    RAID management
    This page shows my broken raid array. I don't dare click the recover button, as that will definately fudge either the WD partition or the OMV partition.


    Q: Is there a way to disable raid management in the config pages?


    File Systems
    I see three partitions:
    md0 (broken raid array) not mounted
    sda1 (ext3) mounted
    sda4 (ext4) mounted


    Since the OMV installation and the data reside on the same drive, I ran into issues making shared folders. On a separate testing machine, I solved it by unmounting the sda4 partition via the webgui and remounting it.


    For some reason, unmounting on the MBL doesn't work and it throws me this error:
    Failed to get configuration (xpath=//system/fstab/mntent[dir='/media/c6cbd09a-4cef-465a-a0dc-b1b2307d638b'])
    Checking the filesystems via ssh tells me there is nothing in the /media folder. sda4 is mounted in /mnt/data (result from the clean debian guide).
    I unmouted /dev/sda4 and then I was able to mount it in the OMV webgui again. This allows me to make shared folders.


    Shared folders
    Trying to set ACLs results in errors. One user has read/write, the other has read only.


  • It's been a couple of days since my last update. Been pretty busy with work, so didn't have time for tinkering.


    I've solved a couple of questions and found a couple of new ones. The goal is to create a setup for the MBL that runs smooth.


    Tweaking
    HD spindown / ramdisk / decrease disk writes
    The HD doesn't spin down. WD's firmware has a ramdrive of a couple of MB to store /var/log and other files that require frequent reads/writes. Every night at 3 am, a cronjob rotates these logfiles to the drive so it can remain in standby most of the time.
    Tried to get the HD to spin down by installing openmediavault-flashmemory. Unfortunately that didn't do the trick, the drive doesn't spin down.


    Update: after doing a fresh install of debian on the MBL (no OMV yet), I noticed that the drive is actually spinning down after a while. I disabled all cron jobs and turned off mdadm monitoring (and turned off exim4 that was installed along with mdadm), but did no further configuration in the drive/power section. It seems that the kernel or the hardware itself is telling the drive to go to sleep.


    As soon as I reinstall OMV, I will further investigate what is causing the drive to stay awake.


    MDADM raid array
    I was being spammed that my raid array was degraded. Since that's by design, I don't want this message.
    Therefore, I dpkg-reconfigured mdadm and disabled all raid arrays/monitoring and thought that was the end of it. Unfortunately, I got another nag this morning. The raid array is also still visible in the webui, so maybe OMV itself is also doing something with mdadm?
    To be continued.


    Resource warnings (monit) / load always above 1.0
    For some odd reason, the system load is always above 1.0. Even if the processor is idle, the load is above 1...

    As a result, monit spams you to death. I edited /etc/monit/conf.d/openmediavault-system.conf


    Increased the 1 min and min load to 3 to get rid of the warnings. However, it seems that some other process (or a reboot) is resetting these settings...
    Got a feeling that turning on/off the monitoring in the webui resets the config file.


    Update manager and plugin manager
    Volker and Reyecoaaron were kind enough to add the PowerPC arch to the repo's. This means that you don't have to jump to through hoops to get OMV installed (to be tested). Moreover, you can install plugins from the webui.


    Write cache (read write speeds)
    Turning "drive-cache on" works wonders. Turned off throughput speed in Samba shares is about 3MB/sec write. Turned on: 50 MB/sec. I'm getting better throughput speeds with OMV than with the WD firmware.


    /dev/tty change
    I was getting a lot of spam in /var/log/auth.log and other logs: getty[1941]: /dev/tty1: No such file or directory
    Solved it by disabling virtual terminals by editing /etc/inittab and comment out the tty section.

    Zitat

    #1:2345:respawn:/sbin/getty 38400 tty1
    #2:23:respawn:/sbin/getty 38400 tty2
    #3:23:respawn:/sbin/getty 38400 tty3
    #4:23:respawn:/sbin/getty 38400 tty4
    #5:23:respawn:/sbin/getty 38400 tty5
    #6:23:respawn:/sbin/getty 38400 tty6



    Open questions
    Postfix setup
    Q: Postfix is soaking up 9% of the MBL's ram. Do I need postfix configured as "internet site", or can I configure it as "no email" and still have a working notifications in OMV?


    Power management
    Q: Since the PowerPC board is already a low power system, does it help to do power management by CPU throttling? How can I check that it works/is active?


    ACL
    How can I fix ACL? I get the following message when trying to set ACL's for shares:

    Zitat

    Failed to execute command 'export LANG=C; setfacl --remove-all --recursive -M '/tmp/setfaclOLFdzf' -- '/media/c6cbd09a-4cef-465a-a0dc-b1b2307d638b/shares/Movies/' 2>&1': setfacl: /media/c6cbd09a-4cef-465a-a0dc-b1b2307d638b/shares/Movies/: Operation not supportedError #4000:exception 'OMVException' with message 'Failed to execute command 'export LANG=C; setfacl --remove-all --recursive -M '/tmp/setfacloUHY2W' -- '/media/c6cbd09a-4cef-465a-a0dc-b1b2307d638b/shares/Movies/' 2>&1': setfacl: /media/c6cbd09a-4cef-465a-a0dc-b1b2307d638b/shares/Movies/: Operation not supported' in /usr/share/openmediavault/engined/rpc/sharemgmt.inc:1182Stack trace:#0 [internal function]: OMVRpcServiceShareMgmt->setFileACL(Array, Array)#1 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)#2 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('setFileACL', Array, Array)#3 /usr/sbin/omv-engined(500): OMVRpc::exec('ShareMgmt', 'setFileACL', Array, Array, 1)#4 {main}


    iotop
    In attempt to figure out what process is writing to disk (and where), I tried using "iotop". The system throws me an error along the lines of:

    Zitat

    need a kernel >= 2.6.20 with accounting support


    Q: Do I need to recompile the kernel or can it be added via another way?


    iptables / fail2ban
    Fail2ban doesn't work. I traced the issue to:

    Zitat

    iptables v1.4.14: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.


    Q: Do I need to recompile the kernel for this as well?


    monit changes
    What process/script is resetting /etc/monit/conf.d/openmediavault-system.conf?

    • Offizieller Beitrag

    All of those kernel questions, please refer to the guy who supplied the patches. He obviously stripped down the kernel to reduce space and not overload the cpu with unnecessary modules.


    About postfix you usually leave it no config so omv configures it automatically. openmediavault-system.conf gets reset by enable/disable system notifications

  • As far as I know, the guy that made the patches compiled the same kernel as the one that western digital supplied (without the board drivers). He then compared the differences between the WD one and the compiled one, to extract the board drivers (APM82181). I think it is just a matter of recompiling the kernel with some more options. However, I'm not really confident in the kernel compilation process, especially because the device is easy to brick.


    I'll get in contact with the guy and see where we go. Will report my findings here ofcourse.
    (Or maybe Reyecoaaron beats us to it :))

  • Update on the load and spindown issues.


    I did a clean install of the MBL, without OMV (yet).
    Even with a clean install, the load is always 1 or higher...


    Does anyone have an idea what can be causing high load, even when the cpu is idle?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!