[Q] How is the storage space on the N5 divided?

Search This thread

Ghengis042

Senior Member
Nov 21, 2007
117
10
Samsung Galaxy A52s 5G
I've owned a Galaxy S2, and a Galaxy S1 (Captivate), both of which had external SD card slots. On these devices, there are various system partitions that share the internal 16GB of storage, used for the operating system, caches, user data, app installation, etc. Part of this is user-accessible as /sdcard, which (I think?) had a fixed size. There was also a fixed amount set aside for application installation. Apps could be moved from the application space to /sdcard, or to /sdcard/external, which was the mount point for the MicroSD slot.

That all made sense to me, though of course it would be nice to be able to designate more or less space for the application partition, or the user partition, or caches, etc, as needed.

On the N5, I don't think it works like that. I saw some posts suggesting that the N5 has multiple mounted filesystems for various tasks as above (system data, app data, installed APKs, caches, user files, etc) but that they are dynamically resized somehow. How does this work? Is it documented somewhere? Do I really need to care, or can I just start installing 1GB+ APKs with abandon? Why do they do this instead of mounting one partition on / and just having sub-directories for /system, /data, etc?
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
I've owned a Galaxy S2, and a Galaxy S1 (Captivate), both of which had external SD card slots. On these devices, there are various system partitions that share the internal 16GB of storage, used for the operating system, caches, user data, app installation, etc. Part of this is user-accessible as /sdcard, which (I think?) had a fixed size. There was also a fixed amount set aside for application installation. Apps could be moved from the application space to /sdcard, or to /sdcard/external, which was the mount point for the MicroSD slot.

That all made sense to me, though of course it would be nice to be able to designate more or less space for the application partition, or the user partition, or caches, etc, as needed.

On the N5, I don't think it works like that. I saw some posts suggesting that the N5 has multiple mounted filesystems for various tasks as above (system data, app data, installed APKs, caches, user files, etc) but that they are dynamically resized somehow. How does this work? Is it documented somewhere? Do I really need to care, or can I just start installing 1GB+ APKs with abandon? Why do they do this instead of mounting one partition on / and just having sub-directories for /system, /data, etc?

http://xdaforums.com/showthread.php?t=2534010
 
  • Like
Reactions: Ghengis042

Ghengis042

Senior Member
Nov 21, 2007
117
10
Samsung Galaxy A52s 5G

So, I asked "why don't they just make one partition with sub-directories", and it sounds like to a certain extent that's exactly what happens. It sounds like /data is one physical partition. When you say that /sdcard "points to" /data/media/0, does that mean that it's just a subfolder that's treated specially, and softlinked to /sdcard? Maybe a loopback device that's mounted at /sdcard? If it's the latter, then does some system process quietly resize the virtual filesystem if /sdcard starts to get full? That's the thing I'd like to be able to read more about....
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
So, I asked "why don't they just make one partition with sub-directories", and it sounds like to a certain extent that's exactly what happens. It sounds like /data is one physical partition. When you say that /sdcard "points to" /data/media/0, does that mean that it's just a subfolder that's treated specially, and softlinked to /sdcard? Maybe a loopback device that's mounted at /sdcard? If it's the latter, then does some system process quietly resize the virtual filesystem if /sdcard starts to get full? That's the thing I'd like to be able to read more about....

So to elaborate a little,

/data is a physical partition.

/data/data
/data/app
/data/media

Are all just directories within /data

/data is 11.35 GB on a 16 GB Version so the maximum any directory in /data can be is 11.35 GB. All /data directories combine to make up this total, just like any other /partition/directory structure

The fact that within /data/media is a FUSE file system isn't too relevant to space usage really. Nothing needs resizing. /data/media's free space is the same as /data/app's free space because they're all pulling from the same location as a shared resource. If you put 2 GB in /data/app, that's 2 GB less that can be used in /data/media

Hope that helps

Edit... and yes, /data/media/0 is the mount point for the universally used /sdcard

-----------------------
Sent via tapatalk.

I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
 
Last edited:

Ghengis042

Senior Member
Nov 21, 2007
117
10
Samsung Galaxy A52s 5G
So to elaborate a little,

/data is a physical partition.

/data/data
/data/app
/data/media

Are all just directories within /data

/data is 11.35 GB on a 16 GB Version so the maximum any directory in /data can be is 11.35 GB. All /data directories combine to make up this total, just like any other /partition/directory structure

The fact that within /data/media is a FUSE file system isn't too relevant to space usage really. Nothing needs resizing. /data/media's free space is the same as /data/app's free space because they're all pulling from the same location as a shared resource. If you put 2 GB in /data/app, that's 2 GB less that can be used in /data/media

Hope that helps

Edit... and yes, /data/media/0 is the mount point for the universally used /sdcard

OK, I think I get it. I'd still be interested in seeing what "ls -l /data/media" looks like -- is "0" a *file* or a *directory* or some kind of block-device? I'm just experienced enough at Linux to be intrigued but inexperienced enough not to have dealt with this kind of thing (on a computer) before...
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
Here you go...

vumahu6e.jpg


-----------------------
Sent via tapatalk.

I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
 
  • Like
Reactions: Ghengis042

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
Yeah its a "mount -o bind"

-----------------------
Sent via tapatalk.

I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I've owned a Galaxy S2, and a Galaxy S1 (Captivate), both of which had external SD card slots. On these devices, there are various system partitions that share the internal 16GB of storage, used for the operating system, caches, user data, app installation, etc. Part of this is user-accessible as /sdcard, which (I think?) had a fixed size. There was also a fixed amount set aside for application installation. Apps could be moved from the application space to /sdcard, or to /sdcard/external, which was the mount point for the MicroSD slot.

    That all made sense to me, though of course it would be nice to be able to designate more or less space for the application partition, or the user partition, or caches, etc, as needed.

    On the N5, I don't think it works like that. I saw some posts suggesting that the N5 has multiple mounted filesystems for various tasks as above (system data, app data, installed APKs, caches, user files, etc) but that they are dynamically resized somehow. How does this work? Is it documented somewhere? Do I really need to care, or can I just start installing 1GB+ APKs with abandon? Why do they do this instead of mounting one partition on / and just having sub-directories for /system, /data, etc?

    http://xdaforums.com/showthread.php?t=2534010
    1
    Here you go...

    vumahu6e.jpg


    -----------------------
    Sent via tapatalk.

    I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit