在Ubuntu14.04版本的执行mount的结果如下:
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)
我不明白为什么/run的子目录被单独挂载在已经挂载的父目录(/run)中,以及none文件系统的意思。我的/etc/fstab文件是空的,没有/run的挂载点。
none只是意味着在发出mount命令时看到的挂载点没有物理磁盘分区(挂载设备)。它用于虚拟文件系统,如shm、ramfs、proc和tmpfs。本示例中的lock、shm和user 挂载点是分别创建的,因此它们可以使用不同的权限和设置进行挂载(就是小括号内的挂载选项)。注意到括号内的部分了吗?
您在/etc/fstab中看不到这些挂载配置的原因是,它们是由upstart(即在系统初始化期间)和initramfs-tools执行的。
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
在Ubuntu14.04中,/run目录的子目录(如/lock、/shm和/user)被挂载为none类型,这是因为none表示没有物理磁盘分区对应的挂载点,常用于虚拟文件系统。这些挂载点在系统初始化时由upstart和initramfs-tools执行,允许设置不同的权限和选项。例如,/run/lock、/run/shm和/run/user是为了特定功能而创建的。在/etc/fstab中找不到这些配置,因为它们是动态创建的。
订阅专栏 解锁全文
2万+

被折叠的 条评论
为什么被折叠?



