logo

File Systems

Last Updated: 2023-08-19

Default File Systems

  • macOS: APFS, Apple File System
    • replaces HFS+
    • optimized for flash and solid-state drive storage, with a primary focus on encryption
    • APFS supports 64-bit inode numbers, supporting over 9 quintillion files on a single volume
  • Windows 10: NTFS
  • RHEL / CentOS: XFS.
  • Fedora: Btrfs
  • gvfs: GNOME Virtual file system. GNOME's userspace virtual filesystem.
  • Debian / Ubuntu: ext4

Check Your File System

File System Types

$ df -Th

You may find other filesystem like:

  • tmpfs: a common name for a mounted file system, but stored in volatile memory instead of a persistent storage device.
  • drvfs: mounted Windows disks, seen in Windows Subsystem for Linux (WSL). e.g. C:\ will be /mnt/c, and D:\ will be /mnt/d

Use diskutil

diskutil list
diskutil info -all
diskutil info /

List All Block Devices and Partitions

$ cat /proc/partitions
major minor  #blocks  name

253        0   31457280 vda
253       16   62914560 vdb
253       32      65536 vdc
253       48  251658240 vdd

Use file -s <device> to check type

$ sudo file -s /dev/vda
/dev/vda: Linux rev 1.0 ext4 filesystem data, UUID=6f54f78f-3f47-488c-ab1b-b1b8a596c2d3, volume name "c3image-rootfs" (needs journal recovery) (extents) (large files) (huge files)

FUSE

FUSE: Filesystem in Userspace. The interface that lets non-privileged users create their own file systems without editing kernel code; a "bridge" to the actual kernel interfaces. E.g. GlusterFS, GmailFS.

Code: https://github.com/libfuse/libfuse

tmpfs

/dev/shm: an implementation of traditional shared memory concept, i.e. passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux.

tmpfs: a temporary file storage paradigm implemented in many Unix-like operating systems, overcomes many of the drawbacks with ramfs. It is intended to appear as a mounted file system, but data is stored in volatile memory instead of a persistent storage device.

btrfs

btrfs has been "almost production ready" for many years now, but never quite got to the stage where it actually was ready. In the meantime, many of the features that btrfs provides are now available via other more mature and stable storage technologies like ext4, XFS, LVM, etc. Redhat is moving from btrfs to Stratis user level file system written in Rust.

Format Portable Disk

TL;DR: exFAT is the best cross platform option, designed to work on Windows and macOS systems.

  • FAT32. Read/write on all three systems. Not journaled. File size < 4G.
  • NTFS. Poor write support on Mac. Journaled.
  • exFAT. Read/write on all three systems. Not journaled. No 4G limit as FAT32.

exFAT has been adopted by the SD Association as the default file system for SDXC cards larger than 32 GB.

ext4 is not accepted by Microsoft.