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 [2022/12/22 19:59] – Overhaul for clarity and reorg for commonly used fs palebloodsky | docs:guide-user:storage:filesystems-and-partitions [2024/09/04 08:37] – [btrfs] artoria2e5 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Filesystems ====== | ====== Filesystems ====== | ||
| - | This page contains basic information about filesystems (file systems) and partitions. | + | This page contains basic information about filesystems (file systems) and partitions. |
| - | A filesystem is "how data is written in a partition of the storage device" | + | OpenWrt is a Linux-based operating system and thus typically works best with filesystems native to Linux. However it can also read/write data with many filesystems, |
| - | Windows, macOS, and Linux use different default filesystems, | + | |
| - | OpenWrt is a Linux-based operating system and thus typically works best with filesystems native to Linux. However it can also read/write data from Windows and macOS filesystems, | + | Installing these additional filesystems in OpenWrt is commonly for file sharing using [[: |
| - | In case you wonder, the reason for this reduced performance/ | + | |
| ==== Check available filesystems ==== | ==== Check available filesystems ==== | ||
| Line 19: | Line 18: | ||
| ===== OpenWrt/ | ===== OpenWrt/ | ||
| - | The two most common Linux filesystems are [[wp> | + | The two most common Linux filesystems are [[wp> |
| - | * ext4 is well suited for HDDs and SSDs (using TRIM) and is the default filesystem of most desktop Linux distributions | + | * ext4 is well suited for HDDs and SSDs (using TRIM) and is the default filesystem of most desktop Linux distributions. |
| - | * f2fs is well suited for flash (SSDs or USB thumbdrives) | + | * 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 31: | 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 38: | Line 39: | ||
| '' | '' | ||
| + | ==== btrfs ==== | ||
| + | This command will download the tools needed to create and fix btrfs\\ | ||
| + | '' | ||
| + | |||
| + | If in the list of supported filesystems in your device you don't see btrfs, you must install also the driver itself\\ | ||
| + | '' | ||
| ===== Windows filesystems ===== | ===== Windows filesystems ===== | ||
| - | The two most common filesystems used by Windows are NTFS and exFAT. | + | The two most common filesystems used by Windows are [[wp>NTFS]] and [[wp>exFAT]] as described below. |
| - | ==== Set up NTFS ==== | + | ==== NTFS ==== |
| - | The primary filesystem | + | NTFS is the primary |
| - | Download and install via the NTFS-3G driver:\\ | + | Download and install via the NTFS-3G driver\\ |
| '' | '' | ||
| - | This command will download the tools needed to create and fix NTFS:\\ | + | This command will download the tools needed to create and fix NTFS\\ |
| '' | '' | ||
| - | See [[docs: | + | See [[docs: |
| - | + | ||
| - | + | ||
| - | ==== Set up exFAT ==== | + | |
| - | + | ||
| - | Another filesystem that commonly used by OEMs on external SSDs and SD cards is [[wp> | + | |
| - | + | ||
| - | This will download the driver to use exFAT, there are currently no tools in OpenWrt to format/check exFAT.\\ | + | |
| - | '' | + | |
| - | + | ||
| - | '' | + | |
| ===== Apple filesystems ===== | ===== Apple filesystems ===== | ||
| - | In Apple land you have [[wp> | + | 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+ ==== | + | ==== HFS and HFS+ ==== |
| This command will download the tools needed to create and fix HFS and HFS+\\ | This command will download the tools needed to create and fix HFS and HFS+\\ | ||
| '' | '' | ||
| Line 79: | Line 74: | ||
| ===== Multiplatform filesystems ===== | ===== Multiplatform filesystems ===== | ||
| - | [[wp> | ||
| - | ==== Set up FAT32 ==== | + | ==== FAT32 ==== |
| + | [[wp> | ||
| 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 106: | 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 | ||
| + | ==== exFAT ==== | ||
| + | |||
| + | 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. | ||
| + | |||
| + | As of Linux kernel 5.4 there is a [[https:// | ||
| + | |||
| + | 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. | ||