No file found on /media after power on, ok after reboot

Hi,
since latest upgrade when I switch on my Rasp Pi I can’t find any file in my USB external storage; the /media folder is empty.
From shell:

    osmc@osmc:/var/log$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   1.8T  0 disk 
|-sda1        8:1    0 931.8G  0 part 
`-sda2        8:2    0 931.2G  0 part 
mmcblk0     179:0    0   7.4G  0 disk 
|-mmcblk0p1 179:1    0   243M  0 part /boot
`-mmcblk0p2 179:2    0   7.2G  0 part /

so it seems it’s correctly mounted.

At this point if I reboot the Rasp Pi I can see all file, and all is working well.

My HD is formatted in NTFS and I have a Rasp Pi B. All hardware is the same from the first release of Raspbmc and I never had same issue.

Not sure that I follow -

You are saying that when you boot up your drive doesn’t mount, but when you reboot, it does ?

Please provide the following logs taken when the drive is plugged in and not appearing correctly:

sudo journalctl | paste-log
mount | paste-log

Does this help?

Sam

You are saying that when you boot up your drive doesn’t mount, but when you reboot, it does ?

yes, it’s so.

here the logs:
http://paste.osmc.io/atoyaxopak
http://paste.osmc.io/akimavecib

@sam_nazarko I’ll check your suggestion later.

Thanks for your help

I can partially see what the problem is there but need a bit more information. I’ve just pushed out an update to diskmount-osmc to add some additional debug information when a disk does not mount properly:

Can you manually check for updates and make sure you see an update for diskmount-osmc being installed, then boot up again such that the disk fails to mount and capture those same two logs again please ?

Thanks.

Thanks for your answer, but I’ll be at home tomorrow evening.

I can’t check until that hour.

Hi @DBMandrake after update I see diskmount-osm is installed, from dpkg.log:

2015-09-06 10:48:24 upgrade diskmount-osmc:all 1.3.2 1.3.3
2015-09-06 10:48:24 status half-configured diskmount-osmc:all 1.3.2
2015-09-06 10:48:24 status unpacked diskmount-osmc:all 1.3.2
2015-09-06 10:48:24 status half-configured diskmount-osmc:all 1.3.2
2015-09-06 10:48:24 status unpacked diskmount-osmc:all 1.3.2
2015-09-06 10:48:24 status half-installed diskmount-osmc:all 1.3.2
2015-09-06 10:48:25 status half-installed diskmount-osmc:all 1.3.2
2015-09-06 10:48:25 status unpacked diskmount-osmc:all 1.3.3
2015-09-06 10:48:25 status unpacked diskmount-osmc:all 1.3.3

and then I shut down and power on tree times: I can see all my file!

Here are the logs:

http://paste.osmc.io/zugiqibicu
http://paste.osmc.io/arenixikim

I don’t know if it is important but now the scraper for music video automatically start from TheAudioDB, it never start before.

If you need something feel free to ask me.

Well that is very strange…

Because the change I made was only to increase the amount of debugging information gathered if the partition failed to mount correctly.

I did not make any change that would have fixed the original problem. That suggests that the problem itself is intermittent. (which I already think is the case)

If you shut down and completely power off, then boot up again does it still work ?

The problem wasn’t intermittent; yesterday I gave instruction to my son (ten years old) to reboot the raspberry if he can’t see any file: he did so two times.
This morning before the update it was the same situation.
After the update in tree time I shut down the Raspi and at startup the partitions were in /media.

How can I came back to the previous version of diskmount-osmc ?
Only for test purpose…

Don’t worry about going back to an old version - I’m certain what I changed can’t have fixed the problem for you.

However we have just pushed another update to diskmount-osmc, version 1.3.6 which does include a fix that we think may solve the problem. So please check for updates again and let us know what results you get.

Thanks.

maybe some race condition that was “fixed” by debug output writing taking some small amount of time?

No, because the debug commands only run if and after a partition is not matched by any of the rules.

This is the change we just added that we’re hoping will fix this:

Hi,
today I boot up my device and again I have no file in /media.

Here the logs:

http://paste.osmc.io/tabigofewo
http://paste.osmc.io/luxexicomi

If could be useful, yesterday I have downloaded three file and deleted one via FTP.

Now I’m starting the update…

From a complete power off, could it be that the hdd is not finished initializing when the system wants to automount the partitions?
Do you have a powered usb hub you could try to hook the drive and the raspberry to and try if it mounts then when you plug in the pi while the hdd is powered on already?
Maybe the usb max current setting could help so the drive doesn’t need multiple attemps to spin up successfully?

Nice thought, but most (all?) of the reports of this issue are for USB thumb drives, which don’t have a spin up time.

Also, the whole point of udev and udisks is it implements hot plugging - you can connect the drive at any point after booting and it will mount at that time - so if the drive is a bit slower getting ready it will simply hotplug when it is ready.

Well, still learning. Especially system stuff. (Always nice if somebody gives a bit of insight) I thought that it might end up in some error state that prevents it from being mounted after it failed the first time. Can you see if it was actually detected and failed to mount or if it was not recognized from the start?
Edit: one last thing before I shut up :wink:
Does it work if you unplug and replug it?

After update I have the same issue.

It was my first thought but in this case I couldn’t see it on list of devices.

Good idea, I tried just now and… it works!
You can see it in the log:

http://paste.osmc.io/zeqecatuda

I hope this thread can help to improve OSMC, my issue is not very serious, the workaround is very simple, just restart.

Thanks very much, the log file confirms my suspicions about the general cause of the problem - the permissions on the device node have not been updated when udisks tries to read the disk. We just have to figure out why now…

Can you try update now and see if the issue persists?

Sam

just updated!

The first attempt is ok, but like previously, I must try many times to be sure to not have more issues.

I will keep you informed