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:fstab [2018/12/06 12:50] – start cleaning up obsolete lede refs karlp | docs:guide-user:storage:fstab [2021/08/10 14:02] – [The Mount sections] daniel | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Fstab Configuration ====== | ====== Fstab Configuration ====== | ||
| - | |||
| The Fstab, or **f**ile **s**ystems **tab**le, is a central configuration that defines how file systems (usually on block devices) should be mounted if requested (such as on booting the device or connecting it physically). This way, you don’t have to manually mount your devices when you want to access them. The mounting configuration can consist of static file systems but also swap partitions.\\ | The Fstab, or **f**ile **s**ystems **tab**le, is a central configuration that defines how file systems (usually on block devices) should be mounted if requested (such as on booting the device or connecting it physically). This way, you don’t have to manually mount your devices when you want to access them. The mounting configuration can consist of static file systems but also swap partitions.\\ | ||
| The fstab UCI subsystem is where all the options for all devices and file systems to be mounted are defined, the actual file is located at **/// | The fstab UCI subsystem is where all the options for all devices and file systems to be mounted are defined, the actual file is located at **/// | ||
| Line 8: | Line 7: | ||
| Since the tool dealing with mounts is **block**, all current options can be found in its [[https:// | Since the tool dealing with mounts is **block**, all current options can be found in its [[https:// | ||
| + | ===== Creating fstab ===== | ||
| + | You should use the //block// utility. | ||
| + | Install the package // | ||
| - | ==== Creating fstab ==== | + | < |
| - | You should use the //block// utility. Install the package // | + | opkg update |
| - | < | + | opkg install block-mount |
| </ | </ | ||
| - | Call //block detect// to get a sample fstab UCI subsystem configuration file. | + | |
| - | < | + | Get a sample fstab UCI subsystem configuration file. |
| + | |||
| + | < | ||
| + | block detect | ||
| </ | </ | ||
| Now there is a UCI subsystem, you can use UCI command line to change it or just edit the file itself. | Now there is a UCI subsystem, you can use UCI command line to change it or just edit the file itself. | ||
| - | It is possible to set ///// on other devices, but the process is a bit more involved, see [[https:// | + | It is possible to set on other devices, but the process is a bit more involved, see [[docs:guide-user: |
| - | Also see this guide: | + | Also see [[docs:techref:block_mount|Mounting Block Devices]] for technical details of the mounting process and scripts involved. |
| - | + | ||
| - | ==== Enable fstab at Boot ==== | + | |
| - | + | ||
| - | To enable the usage of this new UCI subsystem, so that mount points are correctly mounted at boot, write | + | |
| - | < | + | |
| - | </ | + | |
| ===== Configuration ===== | ===== Configuration ===== | ||
| - | |||
| The configuration file consists of a //global// section defining defaults, //mount// sections defining file systems to be mounted and //swap// sections defining partitions to be activated. | The configuration file consists of a //global// section defining defaults, //mount// sections defining file systems to be mounted and //swap// sections defining partitions to be activated. | ||
| Whenever you change your fstab configuration, | Whenever you change your fstab configuration, | ||
| - | < | + | |
| + | < | ||
| + | block umount | ||
| + | block mount | ||
| </ | </ | ||
| ==== The Global section ==== | ==== The Global section ==== | ||
| - | |||
| ^Name ^Type | ^Name ^Type | ||
| |// | |// | ||
| Line 46: | Line 46: | ||
| ==== The Swap sections ==== | ==== The Swap sections ==== | ||
| - | |||
| ^Name ^Type ^Required^Default^Description | ^Name ^Type ^Required^Default^Description | ||
| |// | |// | ||
| Line 53: | Line 52: | ||
| ==== The Mount sections ==== | ==== The Mount sections ==== | ||
| + | ^Name | ||
| + | |// | ||
| + | |// | ||
| + | |// | ||
| + | |//device// |string |::: |- |The data partition’s device node (e.g. sda1) | | ||
| + | |//autofs// |boolean|no | ||
| + | |//target// |string |no | ||
| + | |// | ||
| - | ^Name ^Type ^Required^Default^Description | + | <WRAP important> |
| - | |//device//|string|no | + | Managing |
| - | |// | + | </WRAP> |
| - | |// | + | |
| ===== The right amount of SWAP ===== | ===== The right amount of SWAP ===== | ||
| - | |||
| If you ask people or search the net, you will find as a general rule of thumb //double RAM// for machines with 512MiB of RAM or less than, and //same amount as RAM// for machines with more. This very rough estimate does apply for your embedded device.\\ | If you ask people or search the net, you will find as a general rule of thumb //double RAM// for machines with 512MiB of RAM or less than, and //same amount as RAM// for machines with more. This very rough estimate does apply for your embedded device.\\ | ||
| Be aware that **access time** of swap is absymal if compared to real RAM, so having swap may not help much in your specific case.\\ | Be aware that **access time** of swap is absymal if compared to real RAM, so having swap may not help much in your specific case.\\ | ||