Alpine Linux Storage

Alpine Linux is designed to run as a 'read-only' operating system. All data is written to memory at boot, and continues to run on memory alone.


Diskless Mode

The default behavior of Alpine Linux as described above is called diskless mode.

Because the operating system is running on memory, changes (such as editting a file) do not persist. To make a change persist, the change must actually be committed to a boot overlay file. The lbu utility is provided for this.

lbu commit -d

To show what would be committed without commiting, try one of:

By default, lbu only tracks /etc except for /etc/init.d/. To track other files, try:

lbu include /path/to/file

And to untrack a file, try:

lbu exclude /path/to/file


Data Disk Mode

Persistent storage can be mounted through normal processes. The primary use case is preserving /var (e.g. backtraces and panics that are captured in logs, but will be lost on reboot), or providing swap space to augment the amount of memory available on a machine.

Backup commits made by lbu are saved to /var in this mode of operation.


System Disk Mode

A normal operating system installation.


CategoryRicottone

Linux/Alpine/Storage (last edited 2023-01-08 20:39:49 by DominicRicottone)