WD MyBookLive shutdown

Can someone provide some help regarding to the shutdown feature please?
It is very importante for me as I want to use this as offline backup.

Thank you very much.

From OpenWrt's side (userspace/ init), shutdown/ poweroff works just fine - but the kernel side SoC support for many embedded targets may not deal with this properly (it's more targeted at 24/7 usage, many developers probably never test it). Fixing this will require kernel development/ debugging.

I don't know of anyway to shutdown a USB port from GUI / CLI as it's not called for assuming users have access to simply unplug the port. If it was an interface I could simply do "ifconfig down" and it turns down the IF and just replace down w/ UP to bring it back online.

The command to see the USB interfaces is "lsusb" and would output:

lsusb
Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 002: ID 18d1:4e41 Google Inc. Nexus 7 (MTP)
Bus 001 Device 006: ID 8087:0032 Intel Corp. 
Bus 001 Device 004: ID 26ce:01a2 ASRock LED Controller
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

There might be a way to do a USB shutdown if you google it.

@slh
So no solution has someone has to go deeper on this?
Can I help with something, like testing?
Who could make this happen?

@Tech_Junky
I am sorry what? USB Shutdown?
What does that has to do with this? I am sorry I don't understand.

PS: I don't know how to quote or multi-quote :frowning:

For some reason I thought you were talking about an external drive.

This just is odd to be running OWRT on a NAS. In Linux you can do a "shutdown now" command and it will shutoff whatever device it's running on.

Sorry, currently there is no way to really shut down a WD My Book Live. The board actually has no way of shutting down.

The manufacturer's firmware fakes a shutdown by putting the CPU in an endless loop after disabling everything and turning off the LEDs. The board is still running but it's not doing anything anymore. With OpenWrt that wouldn't work, a watchdog kicks in that senses there is a problem and reboots the device.

(There used to be a rather ugly and very hack-y way that replicates that "fake shutdown", but that does not work anymore with current versions of OpenWrt, so there's no point in describing it here.)

That can be mitigated with different means, the easiest one being not to rely on a single backup.

1 Like

@Tech_Junky OK now makes sense. I would gladly install another firmware, updated and maintained, other than OpenWRT, thought to NAS operation. I just want NAS sharing (well and Rsync :smiley: ). But the stock firmware got hacked and I feel more confident with OpenWRT than stock.

@takimata Thank you very much for your explanation. Thanks for the technical details of the fake shutdown and the time you took to explain what happened in the past.

But I still want something like the remote shutdown.
Can the watchdog timer be changed? Like for instance, to be 2 minutes? That way I would have more time to shut It down.
I am thinking into using a remotely operated switch, controlled by home assistant, with power measure. I would see by consumption if the hard drive was spinning or not. More time before watchdog coming up would give me more time against the latency of the power readings being updated.

Other option could be installing MQTT into OpenWRT and informing in some way that the disk is inactive, so I could safely remotely shut it down.

What do you guys think?

TY

Smart plug might be the only option to kill it remotely and effectively. I don't know of other FW though that would work on it off the top of my head.

It seems to me to be my ideal solution.
I can distinguish between the idle (blue led) and the spinning disk state.

But is it possible to increase the time the disk is “stopped”?
Is it possible to increase the watchdog timer?

I don't have one to play with to figure it out but, trying won't hurt anything.

Do you know where can I look for in order to change the watchdog timer?

In theory yes, in practice it won't help since the maximum timeout for the watchdog is 3 seconds.

Again, I can think of several methods to ensure a backup will not be compromised. Turning off the device is not the only solution.

I am listening to your suggestions :smile:

And then what?

Securing a NAS is outside of the scope of OpenWrt.

There are steps you can take...

This is a bit outside of the scope of this forum, but there are lots of strategies to protect against malware/ransomware. Immutable backups come to mind, make sure a backup can not overwrite older backup files. This can be done with incremental backups and a bit of rights management.

Or have multiple backups in a staggered manner, either by alternating between backup devices, or by having a secondary backup device back up the primary backup. This way you will have some time before a corruption can propagate through your backups.

Air gapping, which is effectively what you do by turning off the backup device, is a valid strategy. It's just not the only one.

In general here's my strategy.

Vital files only go to multiple drives.

Main storage is "NAS" and nothing stored only locally on PC / laptop.

USB drives - i have enclosure with a 1TB NVME sitting in it / 256GB USB drive that's seen as an internal drive when plugged in and can run an OS natively / smaller drives for only vital data that could be a nightmare to replace / rebuild

Phone - 256GB of room and secure w/ fingerprint / FS explorer to the LAN and copy files as needed.

Online - compressed / password protected files uploaded to Google

I have dual NVME drives in the "server / NAS" that auto backup incrementally as well since it's an integral part of the network being as it functions as the router / switch / firewall / AP

Thank you for all your answers.
WD Mybook live is my second drive, it is the drive I use as Backup as my Synology, hence the Rsync requisite.

I have some reading regarding to backups, it will certainly help my strategy :slight_smile: TY

Hello:

Sorry to revive this thread but as I saw tour post was edited early this year I guessed it would not be much of a problem.

There used to be a rather ugly and very hack-y way that replicates that "fake shutdown", but that does not work anymore with current versions of OpenWrt, so there's no point in describing it here.

I take it you are referring to this thread:
[[Solved] Poweroff My Book Live (instead of reboot) - #27 by chunkeey]

I recently scored a practically new MBL 1TB for a song and as I was needing a simple (ie: inexpensive) NAS, I took it home and installed the latest OpenWRT on it.

Strange choice but there is not much else out there for 32bit ppc these days.
But it works, is very reliable and updated frequently.

The first thing that got me was that shuting it down was not an available option so I went looking for something and found this and the previous thread.

Q: does this option still work?

I think there is a hdparm, sdparm, hd-idle feature that does this: [spin down attached hard disk link]

I don't want the drive spinning all the time and unplugging it while it is energised does not suit me too well.

I'd try to hack a script to sync and spin-down or something like that.

Thanks in advance.

PCL

Hello to you all,

I just returned to this thread both to document what I do, and to post a new question.

As I previously mentioned, this is my NAS backup drive.
I repurposed this WD My Book Live with a 4TB drive, installed OpenWRT and this is my cold storage drive, backup target of my main NAS, a Synology.

It has been working amazingly well.
Its speeds are way better than the stock firmware.

As I found out with your help, I cannot shut it down.
So I use and app in my phone, to SSH to the OpenWRT drive iOS (I use this one if someone needs one https://termius.com/free-ssh-client-for-iphone or https://apps.apple.com/us/app/termius-ssh-shell-console-terminal/id549039908 ).
I write the command
poweroff
wait 2-3 seconds
the light turns from green to to blue, I hear the hard drive spinning down and it keeps this state for the next 2-3 seconds
In this time frame, I cut the power

I thing I am doing things OK, if not please advise me a better way :slight_smile:

This brings me to the seconds part: I installed a 4TB that it is getting full.
I am thinking into shucking an external 8TB drive, and repurpose it, inserting into WD Mybook live

-Is there any limitation regarding to size, or as it works with >2TB drive I can assume it will work with 8TB?
-As anyone reported it working with 8TB drives already?
-I don't care about the data inside (they are backups), so it isn't imperative to get it back. But the configuration or the work to get it working is more important. Is there a way of preserving the configuration and partition scheme? What would you recommend? Fresh install and restore configuration or clone the entire disk? Is cloning a good option?

Thank you!