当前位置: 首页 > news >正文

overlayfs

参考:How containers work: overlayfs

how overlays work
Overlay filesystems, also known as “union filesystems” or “union mounts” let you mount a filesystem using 2 directories: a “lower” directory, and an “upper” directory.

Basically:

  • the lower directory of the filesystem is read-only
  • the upper directory of the filesystem can be both read to and written from

When a process reads a file, the overlayfs filesystem driver looks in the upper directory and reads the file from there if it’s present. Otherwise, it looks in the lower directory.

When a process writes a file, overlayfs will just write it to the upper directory.

let’s make an overlay with mount!
Combining the upper and lower directories is pretty easy: we can just do it with mount!

$ sudo mount -t overlay overlay -o lowerdir=/home/bork/test/lower,upperdir=/home/bork/test/upper,workdir=/home/bork/test/work /home/bork/test/merged

what happens when you create a new file?
the new file gets created in the upper directory.

what happens when you delete a file?
 

/run/kata-containers/shared/sandboxes/{$sandboxID}/mounts/

/var/lib/containerd-stargz-grpc

 overlay: lowerdir  upperdir  workdir

http://www.lryc.cn/news/148055.html

相关文章:

  • Mysql中九种索引失效场景分析
  • Android RecyclerView 之 列表宫格布局的切换
  • 妈妈的爱依然深沉
  • net.ResolveTCPAddr(“tcp6“, address)
  • mysql和mybatisPlus实现:datetime类型的字段范围查询
  • 学习笔记:用ROS接收rosbag发布的topic
  • LAMP架构介绍配置命令讲解
  • C语言之函数题
  • SpringBoot的四种handler类型
  • 基于KNN算法的鸢尾花种类预测
  • 英语-面试
  • 文件传输协议
  • Llama-2大模型本地部署研究与应用测试
  • 白嫖idea
  • PyCharm切换虚拟环境
  • 自动化运维工具-----Ansible入门详解
  • 一、Mycat2介绍与下载安装
  • 链表的介绍
  • 深度剖析:数据服务API的安全性与隐私保护
  • MediaPlayer音频与视频的播放介绍
  • 【Terraform学习】Terraform模块基础操作(Terraform模块)
  • 改进的KMeans 点云聚类算法 根据体元中的点数量计算点密度,并获取前K个点密度最大的体元作为初始聚类中心(附 matlab 代码)
  • php user.ini详解
  • 用 PHP 和 JavaScript 显示地球卫星照片
  • Ubantu安装mongodb,开启远程访问和认证
  • 高手速成|数据库脚本生成工具
  • 振动国标2009GB/T 19873.2-2009/ISO 13373-2:2005笔记
  • SpringBoot中自定义starter
  • git-tf clone 路径有空格处理方案
  • IP 地址与域名是一对多的关系。一个 IP 地址可以对应多个域名,但一个域名只对应一个 IP地址。这句话如何理解?