Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:storage:filesystems-and-partitions [2021/07/29 22:02] – [Set up exFAT] fix optional package name palebloodsky | docs:guide-user:storage:filesystems-and-partitions [2024/09/04 08:37] – [btrfs] artoria2e5 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Filesystems ====== | ====== Filesystems ====== | ||
| - | This page contains | + | This page contains |
| - | A filesystem is "how data is written in a partition of the storage device" | + | OpenWrt is a Linux-based operating system |
| - | Windows, macOS, and Linux use different default filesystems, | + | |
| - | OpenWrt is a Linux-based operating system. | + | |
| - | In case you wonder, the reason for this lack of performance/ | + | |
| - | ===== Currently supported | + | Installing these additional filesystems in OpenWrt is commonly for file sharing using [[: |
| - | To see what filesystems can be read by the firmware | + | |
| - | This is an example output from a OpenWrt x86 Virtual Machine, it can read many filesystems as space is not an issue for this target. | + | ==== Check available |
| - | For most devices, you will have to choose what filesystems | + | To see what filesystems can be read currently, |
| - | < | + | |
| - | nodev | + | A full list of filesystems |
| - | nodev ramfs | + | '' |
| - | nodev bdev | + | |
| - | nodev proc | + | The tools for the filesystem of your choosing can be found by writing\\ |
| - | nodev | + | '' |
| - | nodev | + | |
| - | nodev | + | OpenWrt has drivers and filesystem tools available for ext2/3/4, f2fs, btrfs, and many other filesystems supported by Linux. |
| - | nodev | + | |
| - | nodev bpf | + | |
| - | nodev | + | |
| - | nodev | + | |
| - | ext3 | + | |
| - | | + | |
| - | ext4 | + | |
| - | squashfs | + | |
| - | nodev | + | |
| - | btrfs | + | |
| - | f2fs | + | |
| - | xfs | + | |
| - | vfat</code> | + | |
| ===== OpenWrt/ | ===== OpenWrt/ | ||
| - | There are 2 main native | + | The two most common |
| - | In short:\\ | + | |
| - | * ext4 is best suited for hard drives | + | * ext4 is well suited for HDDs and SSDs (using TRIM) and is the default filesystem of most desktop Linux distributions. |
| - | * f2fs is best suited for flash drives | + | * f2fs is well suited for flash (SSDs or USB thumbdrives). The format can be incompatible between kernel versions, requiring some time for " |
| + | * btrfs is the default filesystem for more cutting-edge Linux distributions. It is considered the sucessor to ext4, with the author stating "there will be no ext5". It has some more advanced features such as checksumming. | ||
| + | |||
| + | ==== ext4 ==== | ||
| - | ==== Set up ext4 ==== | ||
| This command will download the tools needed to create and fix ext4 (and older versions)\\ | This command will download the tools needed to create and fix ext4 (and older versions)\\ | ||
| '' | '' | ||
| Line 46: | Line 32: | ||
| '' | '' | ||
| - | ==== Set up f2fs ==== | + | ==== f2fs ==== |
| This command will download the tools needed to create and fix f2fs\\ | This command will download the tools needed to create and fix f2fs\\ | ||
| '' | '' | ||
| Line 53: | Line 39: | ||
| '' | '' | ||
| - | ===== Other filesystems ===== | + | ==== btrfs ==== |
| - | A full list of filesystems available in OpenWrt can be obtained by writing\\ | + | This command will download the tools needed to create and fix btrfs\\ |
| - | '' | + | '' |
| - | The tools for the filesystem | + | If in the list of supported filesystems in your device you don't see btrfs, you must install also the driver itself\\ |
| - | '' | + | '' |
| + | |||
| + | ===== Windows filesystems ===== | ||
| + | |||
| + | The two most common filesystems used by Windows are [[wp> | ||
| + | |||
| + | ==== NTFS ==== | ||
| + | |||
| + | NTFS is the primary Windows filesystem and is available via the '' | ||
| + | |||
| + | Download and install via the NTFS-3G driver\\ | ||
| + | '' | ||
| + | |||
| + | This command will download the tools needed to create and fix NTFS\\ | ||
| + | '' | ||
| + | |||
| + | See [[docs: | ||
| + | |||
| + | ===== Apple filesystems ===== | ||
| + | In Apple land you have [[wp> | ||
| + | |||
| + | ==== HFS and HFS+ ==== | ||
| + | This command will download | ||
| + | '' | ||
| + | |||
| + | If in the list of supported filesystems in your device you don't see **hfs** and **hfsplus**, | ||
| + | '' | ||
| - | OpenWrt has drivers and filesystem tools available for ext2/3/4, f2fs, xfs and btrfs, and most other filesystems supported by Linux. | ||
| ===== Multiplatform filesystems ===== | ===== Multiplatform filesystems ===== | ||
| - | [[wp> | + | |
| - | Its main drawback (for a data drive) is that it cannot store a file bigger | + | ==== FAT32 ==== |
| - | Its lack of journaling support | + | [[wp> |
| - | These days there are better filesystems that work well with multiple operating systems described below. | + | |
| - | ==== Set up FAT32 ==== | + | This command will download the tools needed to create and fix FAT32 (and older versions)\\ |
| - | this command will download the tools needed to create and fix FAT32 (and older versions)\\ | + | '' |
| - | '' | + | |
| If in the list of supported filesystems in your device you don't see **vfat**, you must install also the driver itself\\ | If in the list of supported filesystems in your device you don't see **vfat**, you must install also the driver itself\\ | ||
| '' | '' | ||
| - | ==== Available NLS files ==== | + | === Available NLS files === |
| - | For some filesystems, | + | Some filesystems, |
| '' | '' | ||
| means that you need NLS codepage 437, and a message like\\ | means that you need NLS codepage 437, and a message like\\ | ||
| Line 82: | Line 92: | ||
| means that you need NLS ISO 8859-1. | means that you need NLS ISO 8859-1. | ||
| - | Available NLS files and their packages can be listed by writing '' | + | Available NLS packages can be listed by writing '' |
| ^ Name ^ Description | ^ Name ^ Description | ||
| Line 90: | Line 100: | ||
| | kmod-nls-cp775 | | kmod-nls-cp775 | ||
| | kmod-nls-cp850 | | kmod-nls-cp850 | ||
| - | | kmod-nls-cp852 | ||
| | kmod-nls-cp866 | | kmod-nls-cp866 | ||
| | kmod-nls-iso8859-1 | | kmod-nls-iso8859-1 | ||
| - | | kmod-nls-iso8859-13 | Kernel module for NLS ISO 8859-13 (Latin 7; Baltic) | ||
| - | | kmod-nls-iso8859-15 | Kernel module for NLS ISO 8859-15 (Latin 9) | | ||
| - | | kmod-nls-iso8859-2 | ||
| | kmod-nls-koi8r | | kmod-nls-koi8r | ||
| | kmod-nls-utf8 | | kmod-nls-utf8 | ||
| - | ===== Windows filesystems ===== | + | ==== exFAT ==== |
| - | The primary filesystem used on Windows is [[wp> | + | |
| - | Another filesystem that commonly placed by OEMs on newer external SSDs and SD cards with capacity over 32 GiB is [[wp>exFAT]]. This is available and often has better performance than NTFS-3G on OpenWrt, also as of Linux kernel 5.4, a native driver is now available for improved performance. | + | |
| - | [[https:// | + | |
| - | ==== Set up NTFS ==== | + | |
| - | This command will download the tools needed to create and fix NTFS\\ | + | |
| - | '' | + | |
| - | + | ||
| - | If in the list of supported filesystems in your device you don't see **ntfs**, you must install also the driver itself\\ | + | |
| - | '' | + | |
| - | + | ||
| - | See [[docs: | + | |
| - | ==== Set up exFAT ==== | + | |
| - | This command will download the driver to read exfat filesystems, | + | |
| - | '' | + | |
| - | '' | + | exFAT is commonly used by OEMs for external SSDs and SD cards. The downside to this filesystem is the lack of journaling support, which makes breakage during sudden poweroff more likely. exFAT will provide good performance while maintaining compatibility with Windows and macOS. |
| - | exFAT will provide good performance OpenWrt with kernel 5.4 while maintaining compatability with Windows and macOS. The downside to this filesystem | + | As of Linux kernel 5.4 there is a [[https:// |
| - | ===== Apple filesystems ===== | + | |
| - | In Apple land you have [[wp> | + | |
| - | APFS is new as of 2017 and there is currently no support for it in OpenWrt (nor in Linux). | + | |
| - | + | ||
| - | ==== Set up HFS and HFS+ ==== | + | |
| - | This command will download the tools needed to create and fix HFS and HFS+\\ | + | |
| - | '' | + | |
| - | + | ||
| - | If in the list of supported filesystems in your device you don't see **hfs** and **hfsplus**, | + | |
| - | '' | + | |
| + | This will install the driver to use exFAT and the tool to be able to run check disk if needed:\\ | ||
| + | '' | ||
| + | Under Windows, exFAT does not support TRIM; but under Linux/ | ||
| - | ======Partitions ===== | + | ===== Partitions ===== |
| - | A partition is a way to split the storage space in more different sections, each using its own independent filesystem. | + | A [[wp> |
| - | This can be useful to separate different types of data, like for example to keep your expanded firmware | + | This can be useful to separate different types of data, for example to keep your expanded firmware |
| Discussing advanced partitioning is beyond the scope of this article, as OpenWrt uses the same commandline tools used by any other Linux system. | Discussing advanced partitioning is beyond the scope of this article, as OpenWrt uses the same commandline tools used by any other Linux system. | ||