15

I have Arch Linux running on my Raspberry Pi 2.

Right after install, I ran lsblk, fdisk and df commands (unfortunately I did not save the output) but I had one disk, which is the SD card and two partitions on it. Then, I upgraded the system with pacman -Syu, installed sudo and configured ssh. Now, when I run fdisk it shows I have 16 RAM disks in memory with parameters:

Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

and all kinds of file systems mounted at various mount points (while I personally created only /dev/root and /dev/boot):

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       1.8G  1.1G  557M  67% /
devtmpfs        458M     0  458M   0% /dev
tmpfs           462M     0  462M   0% /dev/shm
tmpfs           462M  328K  462M   1% /run
tmpfs           462M     0  462M   0% /sys/fs/cgroup
tmpfs           462M     0  462M   0% /tmp
/dev/mmcblk0p1  100M   18M   83M  18% /boot
tmpfs            93M     0   93M   0% /run/user/1000

So my question is: What are all these RAM disks and why they are in my system, since I definitely did not create them and what are those file systems mounted?

Edit:

cat /proc/partitions output:

major minor  #blocks  name

1 0 4096 ram0 1 1 4096 ram1 1 2 4096 ram2 1 3 4096 ram3 1 4 4096 ram4 1 5 4096 ram5 1 6 4096 ram6 1 7 4096 ram7 1 8 4096 ram8 1 9 4096 ram9 1 10 4096 ram10 1 11 4096 ram11 1 12 4096 ram12 1 13 4096 ram13 1 14 4096 ram14 1 15 4096 ram15 179 0 31472640 mmcblk0 179 1 102400 mmcblk0p1 179 2 1853439 mmcblk0p2

ruslaniv
  • 253
  • 2
  • 7
  • 1
    I found this related question. That question does not have any great answers either, but one comment suggests that /proc/partitions may be of relevance. You should include the output of cat /proc/partitions in your question. – kasperd Mar 27 '16 at 17:26
  • You won't necessarily find any answers on a Raspberry Pi specific site to general Linux questions. A quick Google finds answers. – joan Mar 28 '16 at 09:34
  • 1
    @joan Oh, i did extensive googling, but i could not find a clear and concise answer, just bits and pieces. – ruslaniv Mar 29 '16 at 12:27
  • Those RAM disks have to enabled before compiling the kernel. 2. They should not actually use any RAM before mounting a FS on them.
  • – flakeshake Mar 30 '16 at 12:31
  • The reason for allocating these RAM disks remains a mystery then... it would seem that the reason would have to be: 1) save writes to the SD card, and/or 2) improve performance by reducing disk i/o latency.But nobody (credible) has gone on record with such a statement. – Seamus May 14 '18 at 20:38