Data Disk Mode
In Data Disk mode also the operating system runs from system RAM, thus it enjoys the same accelerated operation speed as diskless mode. However, swap storage and the entire /var directory tree get mounted from a persistent storage device (two newly created partitions). The directory /var holds e.g. all log files, mailspools, databases, etc., as well as lbu
backup commits and the package cache. This mode is useful for having RAM accelerated servers with variable amounts of user-data that exceed the available RAM size. It enables the entire current system state (not just the boot state) to survive a system crash in accordance with the particular filesystem guarantees.
Installation
Following the Installation steps to complete the base configuration completes the pre-setup of "diskless" Alpine Linux system. In data disk mode, the boot device may also remain the initial (and possibly read-only) installation media, or be copied to a partition (e.g. /dev/sdXY) with setup-bootable
. Refer Creating a bootable device for creating a bootable medium to boot the Data Disk Mode Installation.
As per Bug: #10474, setup-alpine
script will create the data partition and mount it as /var, but setup-alpine's "data" disk mode can not yet configure lbu config storage settings automatically. The current workaround, is to select "none" at the 'where to store configs' prompt (as the new data partition is not listed anyway) and configure lbu manually after setup-alpine
exits, and before rebooting:
- Identify the created data partition, e.g.
/dev/sdXY
, and its filesystemtype, e.g. usinglsblk
- Manually edit the lbu backups location in
/etc/lbu/lbu.conf
and configureLBU_MEDIA=sdXY
(according to the previous findings). - Save the configuration on that partition for the next boot with
lbu commit
. - If (a new) partition fails to get mounted, execute:
mkdir /media/sdXY ; echo "/dev/sdXY /media/sdXY fstype noauto,rw 0 0" >> /etc/fstab
, and trylbu commit
again.
See Also
- Alpine Local backup Utility - lbu'
- Local package cache
- Manually editing a existing apkovl
- Back Up a Flash Memory Installation
- Upgrading Diskless to New Alpine Linux Release
- Diskless PXE Boot
- How to make a custom ISO image with mkimage
- QEMU Diskless example
- Include special files section - To include custom files outside of
/etc
in .apkovl file.