Raspberry Pi 4 doesn't power on WD USB3 drive

Hi there,

Raspberry Pi 4 + usb3 WD drive, works fine but after a reboot drive doesn’t power on.
Node will be used on remote location so it will be quite difficult to press power button on drive each time.

Any idea how to turn on WD usb3 drive after rebooting pi?

Is the drive included in /etc/fstab ?

Sure it is:

root@raspberrypi:/home/pi# cat /etc/fstab
proc /proc proc defaults 0 0
PARTUUID=97709164-01 /boot vfat defaults 0 2
PARTUUID=97709164-02 / ext4 defaults,noatime 0 1
PARTUUID=68346ce0-36db-fe4a-b296-c901a423a7c7 /STORJ-sda1 ext4 defaults,noatime 0 2

After a rebooting pi Rasbian start-up in emergency mode due to lack of drive

I need to manually power on drive or unplug and plug it back to power it on.

Acutally drive is recognized by system:

[Mon Apr 20 22:07:30 2020] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[Mon Apr 20 22:07:30 2020] usb 2-2: New USB device found, idVendor=1058, idProduct=25a3, bcdDevice=10.29
[Mon Apr 20 22:07:30 2020] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Mon Apr 20 22:07:30 2020] usb 2-2: Product: Elements 25A3
[Mon Apr 20 22:07:30 2020] usb 2-2: Manufacturer: Western Digital
[Mon Apr 20 22:07:30 2020] usb 2-2: SerialNumber: 39524B4A5942524C
[Mon Apr 20 22:07:30 2020] usb-storage 2-2:1.0: USB Mass Storage device detected
[Mon Apr 20 22:07:30 2020] scsi host0: usb-storage 2-2:1.0
[Mon Apr 20 22:07:31 2020] scsi 0:0:0:0: Direct-Access WD Elements 25A3 1029 PQ: 0 ANSI: 6
[Mon Apr 20 22:07:31 2020] sd 0:0:0:0: [sda] Spinning up disk…
[Mon Apr 20 22:07:31 2020] sd 0:0:0:0: Attached scsi generic sg0 type 0
[Mon Apr 20 22:07:32 2020] …ready
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] 27344699392 512-byte logical blocks: (14.0 TB/12.7 TiB)
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] 4096-byte physical blocks
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] Write Protect is off
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] Mode Sense: 47 00 10 08
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] No Caching mode page found
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] Assuming drive cache: write through
[Mon Apr 20 22:07:48 2020] sda: sda1
[Mon Apr 20 22:07:48 2020] sd 0:0:0:0: [sda] Attached SCSI disk
[Mon Apr 20 22:08:07 2020] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

But during boot I see Time out error and system goes to emergency mode…

What kind of WD drive is it? Portable WD My Passport (or similar type) or Desktop WD Elements/My Book with a dedicated power supply? I’m assuming a desktop type since I don’t believe the portable types have a “power button”.

I ask as I’ve had/have nodes set up with both kinds and have never had a problem with the external drives not powering up when node (Rpi4) reboots.

@dragonhogan Agreed.
I had many random issues myself when trying to use drives powered by Rpi’s usb ports, because RPi4 can deliver a max of 6w in total, all ports combined, which proved to be far from enough at powering up time when all devices initialize.

I got a powered usb hub (which is way harder to find than one might think, most of the cheap ones out there not being up to the task because of misleading descriptions…), and since then most of my issues disappeared.

Dunno if that could be ur issue, but if your drive doesn’t have a dedicated power, that is certainly something to look into.

WD Elements 14TB with dedicated power supply.

When I reboot Pi by power usb drive always coming on correctly,
once I reboot it from shell/cli “reboot” most of times drive doesn’t power up correctly.

odd, although I don’t think I’ve ever rebooted from shell/cli “reboot,” I am running the full raspbian (and before anyone replies saying that it’s not recommended, I understand, although I’m very unskilled with linux, and the GUI is easy to work with) and always reboot via the “start” menu option.

The drive might not be unmounting cleanly.

Maybe setup a udev rule to unmount … or use systemd service file…

I use raspbian as well but without gui, it consume to much resources.

No, it didn’t solve a problem.

Maybe worth a shot…

I would take it apart and install a toggle switch instead of a power button, that what I did to one of my external powered hard drives. like this https://www.ebay.com/itm/Lots-10Pcs-10x15mm-SPST-ON-OFF-Switch-Mini-Black-2-Pin-Rocker-Switch-DC-12V-16A/362665537540?hash=item54708cf004:g:ZvMAAOSwp~lc8IF6

Booting process is waiting 1m30s for drive…
If during this time I power drive pressing power button everything goes fine…
Then go further and end up with emergency mode…

It’s rather some software related issue as when I startup Pi (not rebooting) drive always come up correctly.

It’s brand new drive so I don’t want to void warranty.

That’s probably the best option for reliable operation. However, it’s not “hands-off” …

My guess is the size of the drive is causing some sort of timing issue with the RPi 4… either shutdown or startup.

The problem has been narrowed to command line issued reboot only.

So the following test matrix should be filled in:

  • Hard shut down and powered on restart (unsure)
  • Graceful power off and restart (unsure)
  • Hot reboot (fail)
  • Cold boot with drive powered on first
  • Cold boot with drive powered on just after Pi4 powered on --but before drive mount.
  • Booted and running Pi and then plugged in USB drive and mount -a command issued.

If your putting this in a remote location though a power button way will never be good, cause if ever it goes into sleep mode your node will be dead in the water. I understand it may void the warranty but you wont have to cut anything you can just temp install it and if something happens you just put it back to normal. You would just install the switch on the inside by passing the power button.

I could easily avoid sleeping mode with creating a file every minute with cron script.

True you could but it wouldn’t be self sufficient you will need to go to the node everytime you restarted it or power outage. I find this to be an issue with all new external powered drives though.