File system quản lý cách data được lưu trên storage: cấu trúc directory tree, metadata (inode: permissions/timestamps/size/data block pointers), free space management, journaling để tránh corruption khi crash.
ext4 (Linux): journaling filesystem, extents thay vì block maps, delayed allocation, dir_index (HTree), max file 16TB, max volume 1EB — workhorse của Linux servers, stable và battle-tested. NTFS (Windows): journaling, Master File Table (MFT), support NTFS permissions/ACL, Alternate Data Streams, compression/encryption built-in, max 16EB — nhưng Linux support read/write NTFS qua ntfs-3g/ntfs3. APFS (Apple): Copy-on-Write (không corrupt khi crash), native encryption, snapshots (Time Machine), clones (copy-on-write files — cp instant), space sharing giữa volumes trong container — optimized cho SSD/Flash.
Thực tế DevOps: Docker image layers dùng overlay2 filesystem; ZFS (FreeBSD/Linux) thêm checksums và RAID tích hợp cho NAS; volume mount giữa host và container cần match permissions.
A file system manages how data is stored on a storage device: it maintains a directory tree, metadata (inodes: permissions, timestamps, size, data block pointers), free space management, and journaling to prevent corruption on crash.
ext4 (Linux): a journaling file system using extents instead of block maps, delayed allocation, dir_index (HTree), max file size 16TB, max volume 1EB — the workhorse of Linux servers, stable and battle-tested. NTFS (Windows): journaling, Master File Table (MFT), NTFS permissions/ACLs, Alternate Data Streams, built-in compression and encryption, max 16EB — Linux can read and write NTFS via ntfs-3g/ntfs3. APFS (Apple): Copy-on-Write (no corruption on crash), native encryption, snapshots (Time Machine), instant file clones (copy-on-write — cp is instant), and volume space sharing within a container — optimized for SSDs and Flash storage.
DevOps context: Docker image layers use the overlay2 file system; ZFS (FreeBSD/Linux) adds checksums and integrated RAID for NAS; volume mounts between host and container require matching permissions.