Drive mount error

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Miguelpt
Posts: 3
Joined: Mon Nov 01, 2021 12:28 am

Drive mount error

Post by Miguelpt »

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
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Drive mount error

Post by Joulinar »

Hi,

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

Code: Select all

dmesg -l err,crit,alert,emerg
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Miguelpt
Posts: 3
Joined: Mon Nov 01, 2021 12:28 am

Re: Drive mount error

Post by Miguelpt »

Hi,

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
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Drive mount error

Post by Joulinar »

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

Code: Select all

dmesg
journalctl
or just to display kernel error messages only

Code: Select all

dmesg -l err,crit,alert,emerg
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Miguelpt
Posts: 3
Joined: Mon Nov 01, 2021 12:28 am

Re: Drive mount error

Post by Miguelpt »

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)

Code: Select all

[41660.372781] EXT4-fs error (device sda1): __ext4_find_entry:1536: inode #2: comm php: reading directory lblock 0
Thank you for your time
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Drive mount error

Post by Joulinar »

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

Code: Select all

fsck -a /dev/sda1
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply