Drive mount error

Good night

I recently installed dietpi on my raspberry pi 2, i am trying to use nextcloud but i am having problems with my external drive.

I mounted the drive using dietpi-drive_manager, i formated and mounted the drive, configured the database and everything works ok for a while.

When i start sending files to the server i start getting this error on the broweser Your data directory is invalid Ensure there is a file called “.ocdata” in the root of the data directory.

And the first time i went to the data file to create the file i checked that the folder was empty, when i try to use ls command i get the following message - the ls: reading directory ‘.’: Input/output error.

I can solve this by just rebooting the server but it keeps happening not allowing me to transfer files.

Any idea of a way to solve this? Could this be a hardware problem?

Thank you


it could be an issue of the drive. How is the drive powered? Do you use a separate PSU or is it powered via USB port only?

Can you check for kernel error messages pls

dmesg -l err,crit,alert,emerg


Thank you for your reply, my hdd is only connected by ussb, it does not have a external power supply connection.

Can you please confirm me where are the logs stores, i checked /var/log but the files are empty

I highly recommend to use a self powered HDD or at least a powder USB hub. Just using the USB port to power your HDD could lead to voltage issues and disconnects.

you could check logs using


or just to display kernel error messages only

dmesg -l err,crit,alert,emerg

Ok i will try to use an USB Hub to test if it solves the problem, what is strange is that i already used this in the past and never had this problem.

i checked the log and all my errors are EXT4-fs error (device sda1)

[41660.372781] EXT4-fs error (device sda1): __ext4_find_entry:1536: inode #2: comm php: reading directory lblock 0

Thank you for your time

what do you have located on this drive? Just Nextcloud data? Are you able to unmount the drive? If yes, you could perform some file system checks

fsck -a /dev/sda1