ExFAT USB wiped on reboot and mount.exfat process


Apologies if there are some obvious oversights in my issues here. I’m 100% new to OSMC/Kodi but willing to learn!

Sam recommended I format my USB HD as ExFAT so I used Mac OS X disc utility and formatted as so. I spent a whole day yesterday setting up some apps like SABnzbd, SickBeard, Deluge etc

Whilst running these applications I noticed a slow down in PAR2 repair and stuttering in video playback so I used top command and noticed that a process/command called mount.exfat was taking ~60-90% of CPU.

I attempted a reboot to see if the mount.exfat process would settle but immediately I noticed all the videos in my library were orphaned. I checked the USB and all sub-folders were gone!

I saved a log to http://paste.osmc.io/edunovoyot I can see there’s a command on line 1328:

COMMAND=/bin/rmdir /media/README /media/USBHDD1

Am I correct in thinking this would have been responsible?

So, in review my questions for you (more knowledgeable chaps) are:

  1. Is the mount.exfat process normal? Would using a different format for USBHDD1 eliminate this?
  2. How can I ensure that my USBHDD1 doesn’t get wiped on reboot? Do I need to add a fstab record? If so could someone point me to an accurate tutorial or suggest the correct syntax.

Many thanks in advance for your assistance.

UPDATE: OK so some more digging/reading/head scratching has unearthed this thread.

Unfortunately whilst I recognise some of the terminology I was left pretty much bafffled.

It would be fantastic if someone could post a robust solution for adding a USB drive to store media files on. I would likely leave the USB drive plugged in 24/7 but if I did remove it I wouldn’t want everything to go haywire again.

I think many Vero users will be in the same boat as me i.e. wanting to use USB drives to store media it would be good if we could start a discussion on preferred methods of how to do this. Unfortunatley at this time, I can only post what not to do :wink:

What makes you think the contents of the drive have been wiped ? Have you plugged it into a PC to check ?

The rmdir command will not have wiped it - it is there specifically to remove only empty (left over) mount point directories should your system not shut down cleanly, it will never delete the contents of the drive. If we didn’t do this then after a power cut or crash your drive would get mounted at a slightly different location causing the links between your library items and files to no longer match up.

I do see an error in your log that suggests that there is a hardware issue with the connection of your USB drive:

Apr 27 23:34:03 osmc kernel: usb 1-1: USB disconnect, device number 2
Apr 27 23:34:04 osmc kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 27 23:34:04 osmc kernel: sd 0:0:0:0: [sda]  
Apr 27 23:34:04 osmc kernel: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Apr 27 23:34:04 osmc udisks-glue[395]: Device file /dev/sda1 unmounted from /media/USBHDD1
Apr 27 23:34:04 osmc udisks-glue[395]: Device file /dev/sda1 removed
Apr 27 23:34:04 osmc udisks-glue[395]: Device file /dev/sda removed

When you are disconnecting the drive are you making sure to choose remove safely ? To do this go to the Videos menu, then Files, you should see your drive listed there, before disconnecting it you should always press the context menu button and choose remove safely - this does the same thing as safe removal of a removable drive in windows, without doing this you run a chance of causing corruption on the disk.

Are you trying to power the drive directly off the Vero, or does it have it’s own power supply ?

Hi DBMandrake,

Thanks for your assistance. Answers to your question below

What makes you think the contents of the drive have been wiped ? Have you plugged it into a PC to check ?

Yes none of the directories and files I downloaded were present when plugged into mac.

When you are disconnecting the drive are you making sure to choose remove safely ?

This occurred on reboot. But on the times I had disconnected I haven’t been using the remove safely option. Will do moving forward.

Are you trying to power the drive directly off the Vero, or does it have it’s own power supply ?

Uh-oh. I’m powering it off the Vero. Is this a big no no?

Depends how much power it draws. A small 2.5" laptop drive in a USB enclosure might be ok, (3.5" definitely not) but I have not tried powering a spinning drive off my Vero to see. It’s certainly a potential cause of trouble if the drive is not getting enough power. I have seen anecdotal reports that one of the USB ports can offer more power than the other one, but I have not confirmed this myself.

It seems very odd that it has been corrupted though - I can’t really offer any explanation for that other than the possibility that the drive is not getting enough power and/or that the drive has not be safely removed before disconnecting. (A shutdown or reboot without “safely remove” is fine however)

It’s definitely not the rmdir command that you were worried about though, rmdir cannot delete a directory that is not empty, so if the drive is mounted and has files/folders in it then the rmdir command will fail to remove it - that’s by design.

Yes it is a 2.5" drive. I’ll reformat and try again today…

On that note. Can you confirm I have the process for a (sorta) permanent USB drive correct.

  • Format ExFAT
  • Plug In to Vero i.e. no editing of fstab required?
  • No need to make a mount point? I have read the README in /media/ and it suggests adding to /mnt directory but I’m not sure if this means the USB drive can never be disconnect?

Apologies for what might be simple/obvious questions. I’m keen to learn and by documenting I hope this will help others who may have similar issues.


An external drive can be plugged in and will automatically mount based on it’s name. So if you name the drive Videos it will appear at /media/Videos.

The recommendation for using /mnt is for manually mounted filesystems that you add in /etc/fstab - such as NFS over a network. Because a USB drive will be automatically mounted you don’t need to worry about this.

It will just appear and should always appear at the same location so long as you don’t rename the drive.

OK thanks DBMandrake - really appreciate your help with this . I’ll try again today and monitor things - it could as you say be a hardware issue.

Would turning on debug help provide better logs if I was to have the same issue again?

Also, any thoughts on the process mount.exfat - I’m assuming it’s linked to the fact that the USB is formatted ExFAT?

Is ExFAT definitely the best format choice or would EXT4 be more efficient on resources? I use Mac but mainly connect to Vero by ssh and ftp so I don’t envisage lots of plugging into Mac.

Not sure about mount.exfat using a lot of cpu resources - I have not seen that happen before, although it’s possible that if it detected some file system corruption when the drive was connected (due to previous unsafe unmounting, or lack of power etc) that it could have been doing a full file system scan to check for errors which could take a while.

I think EXT4 and NTFS perform the best on Linux for external drives and both are journalled as well which helps reduce the chance of corruption in the case of problems.

The problem with that is that a Mac can’t write to a (directly connected) NTFS drive or read/write an ext4 drive as far as I know, so they’re not a good choice if you want to be able to directly connect it to your Mac on occasion. (I think there might be a 3rd party ext4 filesystem for Mac that you can download but I have not tried it)

Fat32 and exFAT have universal read/write support on Mac/Windows/Linux but are slower on Linux and aren’t as robust.

If you’re only ever planning to have the drive plugged into the Vero ext4 is probably the best choice as it is native to Linux, but if you want to be able to plug the drive into other systems I would stick with ExFat.

Great - I’m going to give ext4 a whirl.

I have formatted the drive via ssh using

sudo mkfs.ext4 /dev/sda1

Re-attaching to the Vero it is automatically mounted and if I use

df -h

I can see it correctly mounted:

/dev/sda1  1.8T  68M  1.7T  1%  /media/59eb395f-0339-4ac6-844f-c607a359b959

I think it is using the UUID to make the mount point. Would you have any idea how I can rename it to use something a little more memorable?

EDIT: Also - I can’t write to the drive via FTP currently. Any ideas what ownerships/permissions commands I need to set?

Many thanks


use HFS. (not HFSPLUS).

in mac, format as HFS without Journal. or if you buy license of something like this Write/read access to Linux files under macOS High Sierra - extFS by Paragon Software for Mac. this are solutions which work.

proprietary formats like ntfs or exfat will always be low performance and low quality(reliability). due to their implementation in userland(they are closed and licensed formats, they do not cope with linux kernel software license) and secondly they are closed and licensed and therefore only reverse engineered and only waiting (my opinion) for you to copy anything more important than .Trash from other Volume to — collapse.