/dev ? /run ?

昨天在solidot看到关于/dev被滥用,引发了数个发行版讨论的消息。主要原因是/dev是一个总是存在的类似tmpfs的目录,在系统启动的初期,文件系统都还未挂载的时候,想要使用一个临时目录,那么应该怎么做好呢?有不少程序选择了在dev下创建隐藏文件,本来这些文件应该放在/var/run下面,但是由于很多人会对/var单独分区,使得/var不一定在开机初期就已经存在,这样使得本来应当利用/var/run的程序没法使用它。于是在讨论过后决定引入/run,作为 /var/run的代替品。Fedora 15的systemd已经做出了这个改变。

当然作为一名使用systemd的arch众,当然也已经发现了这个改变!

rootfs on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=498421,mode=755)
/dev/sda2 on / type btrfs (rw,noatime,nodiratime,ssd)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=//lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/ns type cgroup (rw,nosuid,nodev,noexec,relatime,ns)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /sys/kernel/debug type autofs (rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /dev/mqueue type autofs (rw,relatime,fd=27,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /sys/kernel/security type autofs (rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /dev/hugepages type autofs (rw,relatime,fd=29,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,relatime,errors=continue)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
This entry was posted in Linux. Bookmark the permalink.

3 Responses to /dev ? /run ?

  1. Boild says:
    rekonq GNU/Linux x64

    同systemd众,看了下/proc/self/mounts,果然……

  2. 右京样一 says:
    Google Chrome 10.0.648.204 GNU/Linux

    我想问……Arch用了systemd那么rc.conf还能用么?

  3. Boild says:
    rekonq GNU/Linux x64

    @右京样一 能兼容的,参见wiki,原来的daemon可以被启动。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.