May Update - External USB Drive Not Mounting?

I bought an 8TB external HDD last week, attached it to my Vero 4K and formatted it to ext4 (I didn’t set it up to automount in fstab). I transferred files to it via FTP and all was well. I notice now, however, that the drive is no longer mounted. I tried unplugging the USB and plugging it back in, nothing. Tried unplugging the power cable and plugging it back in, nothing. Tried rebooting the Vero 4K, nothing. Each time I hear the drive spin up as it should, but no luck.

Could this be an issue with the May update?

Well logs will tell us more.
But as May update didn’t had Kernel change it is unlikely


Edit: I viewed the log and found the error it was reporting. A Google search led me to try the command below, seems to be fixed now.

e2fsck -f /dev/sda2

1 Like

I’ve now had to run this twice since posting in order to fix a corrupt file system. Is there a known issue with attached external USB drives and OSMC?

How are you rebooting your 4K?
From your original post I’m assuming that the drive is self-powered?

I normally leave it running 24/7, but if I reboot it’s the standard Power --> Reboot. Does OSMC unmount it properly during a reboot?

Yes it does, or else we would could flooded with problems like this. However, ext4 is fairly robust as to yanking a drive without unmounting it.

You didn’t answer me, the drive is self powered?

Sorry, yes, it’s powered.

Seagate 8TB External USB 3.0 HDD

Well, I had a brief 5-minute power outage today and I needed to run this fix again. Aside from a UPS, any tips on what I can do or what setting I can enable somewhere to help prevent this problem from happening any time there is a power outage?

Since this seems to be a problem fairly unique to you, I’d look into what may be happening on your system. My guess would be that you have something writing to the drive, like downloading torrents.

If you don’t have a torrent (or something similar) running, you could mount the drive as read-only.

Well UPS would be best approach for avoiding data loss in such situations.
Otherwise you could try BTRFS as a filesystem which might be better in recovering after outage.

No torrents, I purchase all of my media. The only thing I can think of is I have the FTP server installed from the OSMC store, which I use to transfer 4K rips from my PC upstairs to the attached drive in the home theater, however nothing was being transferred at the time of the power failure.

Maybe I should have tried a different filesystem early on, kind of difficult now with 60+ 4K rips.

You could try lsof to see what files are open on the drive:

lsof +D '/path/to/drive'


lsof +D /media/Movies

if that’s where your drive is mounted.

Command not found.

It could be the drive itself has issues. These modern drives no longer work like they once did where they expect the writes to be perfect and inform the operating system whenever it had to map out a bad sector. They don’t even bother doing a full surface scan at the factory anymore as they monitor the strength of each bit every time its reading and will move data independently. It may be worthwhile to use the manufactures utility and run a full drive scan. Just be aware that it will take many hours on a 8tb drive. Even if it comes back as being healthy it can be advantageous for the drive as it will normally find and fix weak sectors as it is doing the scan.

You ran that on the Vero while SSHed in? I thought lsof was installed by default.

EDIT: try

sudo apt install lsof

Installed. Currently watching Deepwater Horizon. Command comes back with:

kodi.bin 820 osmc   54r   REG    8,2 65426676350 112066584 /media/UHD_Movies/4K Movies/Deepwater Horizon/Deepwater Horizon.UHD.4K.atmos.mkv

You can add the -r option to have it run and output open files every 15 seconds:

lsof -r +D /media/Movies

See if you notice any files being opened that you are not expecting. You can add a number in seconds, so to show every second:

lsof -r 1 +D /media/Movies

If you want to save the output, add > /home/osmc/lsof.txt:

lsof -r +D /media/Movies > /home/osmc/lsof.txt

Then after a power outage you can look at lsof.txt to see if there were any open files.

1 Like

If you want to keep running this without an open terminal:

nohup lsof -r +D /media/Movies&

It will run forever until you reboot or manually kill it.

You can log back in at any time and see the progress live with

tail -f ~/nohup.out

Exit that with a CTRL-C. The lsof command will still be running.