最近需要使用到 ramfs 和 tmpfs 做内存文件系统,下面对这两个文件系统相关的信息,做一下总结:
参考链接:
https://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/
https://www.cnblogs.com/dosrun/p/4057112.html
https://www.cnblogs.com/zlhff/p/5436092.html
http://blog.chinaunix.net/uid-375398-id-4096820.html (ramdisk 于 ramfs )
ramfs, tmpfs, rootfs, initramfs的区别
ramfs 和 tmpfs 对比:
Experimentation | Tmpfs | Ramfs |
---|---|---|
Fill maximum space and continue writing | Will display error | Will continue writing |
Fixed Size | Yes | No |
Uses Swap | Yes | No |
Volatile Storage | Yes | Yes |
结论:
Linux 社区文档:
https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt
https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
https://en.wikipedia.org/wiki/Tmpfs (/dev/shm)
ramfs 与 tmpfs 的使用和测试(没想到之前也写过类似的博客,竟然忘记了):