10

In Ubuntu 14.04 when executing command mount I get following excerpt

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)

I do not understand why subdirectories of /run are mounted separately inside already mounted parent directory (/run) and what none filesystem means. My /etc/fstab file is empty.

6

The none just means that there is no physical disk partition linked to the mount point you see when issuing the mount command. It is used for virtual filesystems like shm, ramfs, proc and tmpfs. The lock, shm and user mount points in this example are created separately so they can be mounted with different permissions and settings. Notice the part inside the parentheses?

The reason you don't see these mount configurations in /etc/fstab is because they are performed by upstart (i.e. during system initialization) and initramfs-tools. You can investigate yourself with:

grep --color -RE '/run/(lock|shm|user)' /etc 2>/dev/null

but more interesting is probably:

# grep --color -R 'run_migrate' /etc 2>/dev/null
/etc/init/mounted-var.conf:    run_migrate () {
/etc/init/mounted-var.conf:    run_migrate /var/run /run
/etc/init/mounted-var.conf:    run_migrate /var/lock /run/lock

The last part shows that to find the origins of /run/lock you need to search for /var/lock, for example.

  • Correct me if I understand wrong but what you say is: I can mount some partition e.g. /dev/sda1 at /home with some privileges eg.: readonly but then remount part of /home e.g. /home/captcha with privileges read-write. In such scenario /home/capcha is reported by mount as 'none' filesystem but is stored on /dev/sda1 same as rest of the /home partition. – Trismegistos Jun 12 '14 at 8:51
  • Not sure, but my guess is that it would only allow more restrictive permissions in subset mount points. The 'mount --bind' method for the various /run/ filesystems can be seen in /lib/init/mount-functions.sh Doing a man tmpfs now.. – captcha Jun 12 '14 at 10:54
  • I do not think that it means it has no partition. None takes place of filesystem type e.g. tmpfs so it would rather mean that there is no any filesystem assigned to this mount point but it does not make any sense. – Trismegistos May 9 '15 at 14:46
  • What's the use of df if it even can't distinguish different filesystems? What if there are two none file systems that actually represent two different file systems, and what if the same? How am I to distinguish those? – Artem Novikov Apr 18 '18 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.