Skip to main content

FS

FileSystem

逻辑/内存

fsmount pointnotes
proc/proc
sysfs/sys
devfs/devlinux 4.16+ 废弃
devtmpfs/devudev
cgroup/sys/fs/cgroup
cgroup2/sys/fs/cgroup/unified
cpuset/sys/fs/cgroup/cpuset
debugfs/sys/kernel/debug
bdev
tracefs
securityfs/sys/kernel/security/LSM - Linux Security Modules
sockfsTCP/UDP sockets
bpf
hugetlbfs
devpts/dev/ptsPseudo terminals
mqueue
binder/dev/binderfsAndroid binder IPC
pstore/sys/fs/pstore
bindfs
fuse
fusectl/sys/fs/fuse/connections
autofs按需挂载和卸载
specfs/dev/streams不需要挂载
tmpfs/tmp,/run
ramfs
pipefspipe:当 shell 使用 pipe 时
loopfs/dev/loop*
rootfs/
fscache
erofsEnhanced Read-Only FS

逻辑

fsnotes
overlayfs
unionfs
aufsv1 AnotherUnionFS, v2 Advanced multi-layered Unification fs

物理/硬盘

fsnotes
ext3
ext4
zfs
ntfs
exfat
xfs
erofsEnhanced Read-Only File System¶
squashfslive-distro - 替代 cramfs
omfsOptimized MPEG Filesystem
initramfsINITial RAM FileSystem
initrdInitial Ramdisk
cramfsCompressed RAM/ROM FileSystem - 嵌入式替代 initrd

网络

fsnotes
nfs
smb
cifs
pvfs2OrangeFS
juicefs
davfs2WebDAV
ftpfs
sshfs
gfs2Global File System by RedHat
cat /proc/filesystems # 支持的 fs
ls /proc/fs/ # fs 模块
cat /proc/mounts # 挂载情况

# https://www.kernel.org/doc/html/latest/filesystems/debugfs.html
mount -t debugfs none /sys/kernel/debug

# https://docs.kernel.org/admin-guide/binderfs.html
mkdir /dev/binderfs
mount -t binder binder /dev/binderfs

mount -t specfs none /dev/streams

bind

  • 系统 将一个 目录 挂载 到一个挂载点
    • 一般是 挂载 设备
  • 类似 symlink - 但不依赖应用 lookup
  • 类似 hardlink - 但不依赖 fs
  • 参考
mount --bind /a /b          # 也可以使用 -o bind
mount --rbind /c /b # 重新 bind
mount -o remount,ro,bind /b # 重新设置为 只读
mount --move /b /d # 移动挂载点