We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

Questions on sub-directories under /media/sdcard

asked 2015-10-19 16:37:58 +0300

pichlo gravatar image

updated 2015-10-21 18:30:24 +0300

EDIT:

This thread started off as a question what the folders under /media/sdcard are for. This question was answered pretty quickly ("to bypass tracker's limitations and to identify multiple partitions on the SD card"). What I would like to know now is why those folders are left behind when the card is removed. Is there a reason for it or is it simply an omission?

A second part of my question is, what is the 'sdcard' part for? I would imagine a directory structure /media/UUID1, /media/UUID2.. would make more sense than /media/sdcard/UUID1, /media/sdcard/UUID2... At least that is how it is usually done, if I am not mistaken.

I am leaving the original wording of the question below so that the comments still make sense.


As subject. Not questioning, just asking. For example...

image description

Obviously, Jolla can hold only one SD card at a time. I could understand showing two different sub-directories for different partitions but this is not the case here. Only B4D3-3BFC exists, 5AC7-FDDA is a leftover after a card I no longer have. Are those sub-dirs not supposed to be created and removed dynamically?

edit retag flag offensive close delete

Comments

These sub-directories are the problem for FileCase app. After changing a card this app still consider previously used directory as actual. So when you select SD card from app menu you see an empty directory.

kandelabra ( 2015-10-19 17:31:56 +0300 )edit

Of course they are removed after unmounting – as I see on my phone trying different SD cards. Are you sure about your SD card partitioning?

AliN ( 2015-10-21 00:05:28 +0300 )edit

3 Answers

Sort by » oldest newest most voted
5

answered 2015-10-20 19:43:16 +0300

MSameer gravatar image

The subdirectories are named after the filesystem UUID (I think this got changed recently). It had to be done like that to work around a tracker (filesystem indexer) limitation.

edit flag offensive delete publish link more

Comments

1

Including the fact that stale empty sub-dirs are left behind?

pichlo ( 2015-10-20 20:06:41 +0300 )edit

glad to hear that this has been fixed.

lakutalo ( 2015-10-20 20:13:13 +0300 )edit

It was being named after the UUID of the filesystem but it has been changed to something else which I do not recall.

What happens if you have a card with 2 partitions inserted? 2 unique directories will be created and used. One per partition and as long as you have not formatted the filesystem, they will stay the same.

MSameer ( 2015-10-20 21:05:04 +0300 )edit
4

answered 2015-10-19 17:00:25 +0300

Andy Branson gravatar image

updated 2015-10-19 17:00:44 +0300

The current Jolla phone can only hold one SD, but that doesn't mean Sailfish shouldn't support more. The Tablet supports USB on-the-go, which lets you connect USB devices to the microUSB slot. It seems likely that USB flash drives would get mounted in that directory tree when they get automounted.

edit flag offensive delete publish link more

Comments

Yes, but should they leave behind empty directories when unmounted?

pichlo ( 2015-10-19 17:20:08 +0300 )edit
2

Well I suppose so :)

I bet there are much larger vestiges left behind elsewhere in the filesystem though, especially if you've been using the phone without a reflash since 1.0.0.5...

Andy Branson ( 2015-10-19 17:28:36 +0300 )edit
1

answered 2015-10-20 16:13:49 +0300

lakutalo gravatar image

updated 2015-10-20 20:46:38 +0300

I would be happy if one subdirectory could be associated with one card only.

Would that be possible? As for now the same card remounted often leads to a completely new subdirectory.

EDIT: As posted by MSameer here this has been fixed already, making my request outdated and dispensable. :)

edit flag offensive delete publish link more

Comments

1

It does? I have not tested that. That's even worse.

pichlo ( 2015-10-20 16:59:54 +0300 )edit

Makes many scripts worthless unless you put a lot of intelligence into them (or keep the sd card in the phone).

lakutalo ( 2015-10-20 17:07:49 +0300 )edit

That definitely should not happen - I kinda expected the folder to be named after the partition UUID - it would be pretty stupid if it was not the case!

MartinK ( 2015-10-20 18:04:03 +0300 )edit

By now I have had to change the path to this very directory used in a script 3 times in less than 1 year. I will try to reproduce unless anyone else does.

lakutalo ( 2015-10-20 18:23:24 +0300 )edit

@lakutalo, I just tried to reproduce it. Unsuccessfully. Jolla off, card out, Jolla on, Jolla off, card back in, Jolla on. No new sub-dirs. Tried a few times with also oreplacing SD cards in between and new sub-dirs are added for each new SD card but no new sub-dirs for reusing the one used before.

Are you sure you did not reformat your card between uses?

pichlo ( 2015-10-20 20:04:48 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-10-19 16:37:58 +0300

Seen: 744 times

Last updated: Oct 21 '15