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!
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
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:
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 ?
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.
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.
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.
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.