Drive unmounted randomly

My HDD unmounted from /mnt/drive1 and the label for it was sdb1 causing Storj to exit. Now when I checked, it’s label is sdc1 but the UUID is the same.

This whole thing caused my node to be down for an hour already and I only started yesterday. I don’t want to get this node disqualified so please help me figure this out. I end up having to reboot to get the fstab auto mount to get it working again.

Screnshots: Imgur: The magic of the Internet

Hi Eleos,

How are you referencing the storage drive in your docker run command? It looks like you have the drive properly added to your fstab file by using UUID, so it should always mount to /mnt/drive1 regardless of it showing in the system as sdb1 or sdc1. If you provide your docker run command with any sensitive information removed, this would be helpful to see where things might be going wrong.

–edit–
Just though of this after pressing send. If your drive has unmounted randomly, you should look in dmesg for errors related to that drive and see why it may have unmounted. If it is an external USB drive, make sure it has sufficient power as the raspberry pi might not be providing enough power to the drive if you have too weak of a power supply.

1 Like

Here is what I got running for the node

docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967/tcp \
    -p 28967:28967/udp \
    -p 14002:14002 \
    -e WALLET="0x---" \
    -e EMAIL="---" \
    -e ADDRESS="---:28967" \
    -e STORAGE="14TB" \
    --user $(id -u):$(id -g) \
    --mount type=bind,source="/home/pi/nodeidentity/node1",destination=/app/identity \
    --mount type=bind,source="/mnt/drive1/data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

I’ve never had drive issues before, I’ve even had this 16TB drive plus 2x 8TB drives all running on this pi without a powered USB Hub. They are all external 3.5" drives. I came from Chia farming if that is any help.

Can I check dmesg while the node is running?

-edit-
Each drive has their own power plug plugged into the wall outlet.

Yes, you can check dmesg while the node is running, it is a linux tool.

I don’t see anything wrong with your run command, and the node did what it was supposed to when the drive unmounted. See if you can find anything through dmesg or system logs that might shed some light on the drive unmounting. I think that the drive changing from sdb to sdc usually happens if it’s connected to a different USB port.

By the way, you can run the command mount -a to automatically mount everything in the fstab file without a restart.

Thank you for the mount -a, I can just use that instead of rebooting if it happens again.

I just input dmesg but I don’t know what I’m looking for.

If the drive was previously sdb1, you could try:

dmesg | grep sdb1

Although I can’t remember if the output from dmesg will provide messages from before your last reboot. You could also check the kernel logs for anything concerning sdb1

cat ~/var/log/kern.log | grep sdb1

Or perhaps one of the other logs in that folder.

dmesg | grep sdb1:

[   11.677543]  sdb: sdb1
[   59.067373] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Quota mode: none.

cat ~/var/log/kern.log | grep sdb1

cat: /home/pi/var/log/kern.log: No such file or directory

You are going to get that with a raspberry pi. I had random disconnect with raspberry pi when I tried it before.
You are better off buying a cheap mini pc to run this.

What cheap mini pc would you recommend then? Could you also explain why it happens?

I was using a Lenovo m600 8GB of ram and using an intel j3710 process with 2x 2.5” usb powering with only the USB. Never had a single disconnect or crashes.

You can look at dell optiplex, Lenovo, or hp 400, 600 or 800

Yes, dmesg is helpful until you reboot.

Checking logs for the past events is possible too, but you need to know at least a date (or number of boot) when this disconnect is happened. For example, the kernel messages from a previous boot, contained “sdb”:

journalctl -k -b -1 -g "sdb"

But likely it’s either problem with a power supply, or USB controller overheat or HDD is decided to go into a sleep mode. So, I would like to suggest to disable sleep mode for the disk, check cables and make sure that your PI and USB controller inside the box with the disk are cooled enough.

Maybe you’re right in saying it could have gone to sleep. These drives do go to sleep every 3m and I had a used the following to prevent it. I did forget to set this up for my node though.

*/2 * * * * touch /mnt/drive1/.stayawake

Now, I did literally just have a power glitch in my house which caused the same issue so I’m guessing that I should invest in a UPS. I have no clue if that was the cause to the first drive unmount as I was asleep. Any suggestions on a decent cheap UPS anyone?