2

On every boot, my machine (CentOS 7) mounts all these:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        30G  2.6G   28G   9% /
devtmpfs        287M     0  287M   0% /dev
tmpfs           294M     0  294M   0% /dev/shm
tmpfs           294M   34M  261M  12% /run
tmpfs           294M     0  294M   0% /sys/fs/cgroup

But my /etc/fstab only contains these:

# cat /etc/fstab
UUID=823db525-82d9-467e-acdf-7379cbd85171 /    xfs     defaults        0 0

Where would all the mounts of "tmpfs" be defined?
Where can I configure their sizes?

If I add more entries in my /etc/fstab, such as something like:

tmpfs       /dev/shm     tmpfs   defaults,noatime      0 0

Would that cause a conflict with whatever setting is already mounting that on boot?

Nuno
  • 461
  • 1
  • 5
  • 23

1 Answers1

1

CentOS 7 uses systemd.
Systemd will create some API File Systems automatically, with default (kernel) settings but you can still add those to /etc/fstab to use custom options:

... Even though normally none of these API file systems are listed in /etc/fstab they may be added there. If so, any options specified therein will be applied to that specific API file system. Hence: to alter the mount options or other parameters of these file systems, simply add them to /etc/fstab with the appropriate settings and you are done...

In addition to the conventional /etc/fstab control file systemd supports .mount unit files which can be used to manage your custom mounts.
See man systemd.mount for more detail.

HBruijn
  • 72,524
  • 21
  • 127
  • 192