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:39] – [Set up FAT32] typo fix 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 [[: |
| + | |||
| + | ==== Check available | ||
| To see what filesystems can be read currently, enter '' | To see what filesystems can be read currently, enter '' | ||
| - | Below is an example output from an OpenWrt | + | |
| - | < | + | A full list of filesystems available in OpenWrt can be obtained by writing\\ |
| - | nodev sysfs | + | '' |
| - | nodev tmpfs | + | |
| - | nodev bdev | + | The tools for the filesystem of your choosing can be found by writing\\ |
| - | nodev proc | + | '' |
| - | nodev | + | |
| - | nodev | + | OpenWrt has drivers and filesystem tools available for ext2/3/4, f2fs, btrfs, and many other filesystems supported by Linux. |
| - | nodev | + | |
| - | nodev | + | |
| - | nodev | + | |
| - | nodev bpf | + | |
| - | nodev | + | |
| - | nodev | + | |
| - | nodev | + | |
| - | ext3 | + | |
| - | | + | |
| - | ext4 | + | |
| - | squashfs | + | |
| - | nodev | + | |
| - | nodev | + | |
| - | | + | |
| - | nodev | + | |
| - | nodev | + | |
| - | </ | + | |
| ===== 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 48: | 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 55: | 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)\\ | ||
| '' | '' | ||
| Line 76: | Line 84: | ||
| '' | '' | ||
| - | ==== 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 94: | Line 102: | ||
| | 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-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: | + | exFAT is commonly used by OEMs for external SSDs and SD cards. The downside |
| - | ==== Set up exFAT ==== | + | |
| - | This command will download the driver | + | |
| - | '' | + | |
| - | '' | + | As of Linux kernel 5.4 there is a [[https:// |
| - | + | ||
| - | exFAT will provide good performance OpenWrt with kernel 5.4 while maintaining compatability with Windows and macOS. The downside to this filesystem | + | |
| - | ===== 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. | ||