mount挂载虚拟文件系统

man mount查看标准格式

The standard form of the mount command, is
              mount -t type device dir

What does the 'none' mean in 'mount' command?

"The none just means thatthere 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. =

虚拟文件系统没有对应的设备

由于 proc 是内核虚拟的一个文件系统,并没有对应的设备,所以这里的 -t 参数不能省略。由于没有对应的源设备,这里的 none 可以是任意字符串,取个有意义的名字就可以了,因为用 mount 命令查看挂载点信息时第一列显示的就是这个字符串。

mount挂载虚拟文件系统,device字段给none

AUFS实例中的应用

mount -t aufs -o dirs=./container-layer:./image-layer1:./image-layer2:./image-layer3 none ./mnt
[root@localhost aufs]# mount -t aufs -o dirs=./container-layer:./image-layer1:./image-layer2:./image-layer3 none ./mnt
mount: 未知的文件系统类型“aufs”
cd /etc/yum.repo.d  或者 cd /etc/yum.repos.d  
# 下载文件
wget https://yum.spaceduck.org/kernel-ml-aufs/kernel-ml-aufs.repo
# 安装
yum install kernel-ml-aufs
# 修改内核启动
vim /etc/default/grub
## 修改参数
GRUB_DEFAULT=0

# 重新生成grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg

# 重启计算机
reboot

猜你喜欢

转载自www.cnblogs.com/yudidi/p/12458882.html
今日推荐