Skip to content
https://abc.microfintool.com/

Mobile & Accessories

Smartphone Reviews, Specs, Comparisons & Electronics Guides

  • Welcome to ABC Tool: Your Ultimate Portal for Smartphones and Accessories
  • PRIVACY POLICY
  • Blog
  • Contact
Make Linux servers fun again!

Make Linux servers fun again!

Posted on April 24, 2026October 10, 2026 By Muhammad Safdar No Comments on Make Linux servers fun again!
Blog

Everything you need to know about make linux servers fun again.

[ad_1]

Persistence by Choice

The immutable nature of Lightwhale offers clear advantages, but in order to install, configure, run containers, and write data, a writable filesystem is required. And for the system to be genuinely useful, such changes must persist across reboots.

The Data Filesystem

Lightwhale provides both temporary and persistent writability through an automated subsystem activated early during startup. This mounts the data filesystem at /mnt/lightwhale-data.

All data written by Lightwhale is kept within a single subdirectory: /mnt/lightwhale-data/lightwhale-state. This in turn serves as the writable upper layer in an overlayfs stack, with the immutable root as the lower layer.

By default, Lightwhale mounts a volatile tmpfs as its data filesystem. When persistence is enabled, the data filesystem instead resides on a storage device and is mounted accordingly.

Key Directories

The data filesystem overlay does not cover the entire root filesystem; that would defeat the purpose of immutability and Lightwhale altogether. Instead, the writable overlays apply only to a few strategic directories:

/etc
For customizing system configuration, including networking, password, and sshd settings.
/var
For log and other application data.
/home
For user account customization, including authorized SSH keys, and cloning Git repositories with Docker and Swarm stacks.

Docker Data

Docker is configured with its data root directory located directly on the data filesystem, where all Docker runtime data is stored, including images, containers, volumes, and network state:

/mnt/lightwhale-data/lightwhale-state/docker

Enable Persistence

Persistence must be enabled explictly by writing the magic header to the storage device to be used, e.g. /dev/sdx:

echo "lightwhale-please-format-me" | sudo dd conv=notrunc of=/dev/sdx

Multiple storage devices are supported to have a magic header written, and will be assembled into a Btrfs RAID1 volume.

The next time Lightwhale boots up, it will detect the magic disk, format it, and make it the data filesystem.

Managing Persistence

The persistence subsystem is initiated from /etc/init.d/S11persistence, and proceeds through a sequence of detailed steps, executed fully automatically:

1. Find data filesystem

Scan all disks for a partition with the filesystem label lightwhale-data.

If found, use it as the data filesystem and jump to step 6; otherwise proceed to step 2.

2. Find magic disks

Scan all disks for the magic header, specifically this exact byte sequence at the very start of the device: lightwhale-please-format-me.

If found, treat each as a magic disk and proceed to step 3; otherwise jump to step 6.

3. Create magic partitions

For each magic disk, create a swap partition labeled lightwhale-swap, then create a Linux partition that uses the remaining space and label it lightwhale-data. Then proceed to step 4.

4. Find magic partitions

Scan all disks for swap partitions labeled lightwhale-swap and Linux partitions labeled lightwhale-data. Treat each as a magic swap partition or magic data partition and proceed to step 5.

5. Create data filesystem

All magic swap partitions are formatted and labeled lightwhale-swap.

If only a single magic data partition exists, format it with btrfs --data single --metadata dup.
In case of multiple, join them into a RAID1 and format with btrfs --data raid1 --metadata raid1cn. Subvolumes are created for @lightwhale-data, @lightwhale-state, and @lightwhale-state-snapshots.

Label the data filesystem lightwhale-data, so it can be detected in step 1 at next startup.

6. Mount data filesystem and prepare state directory

If a data filesystem was created or found, mount its subvolume @lightwhale-data at /mnt/lightwhale-data; otherwise mount a tmpfs instead.

7. Mount overlays

Prepare the immutable lower layer: Bind mount /etc on /run/lightwhale/overlay/lower/etc, and mirror the entire directory tree of the immutable root filesystem.

Prepare the writable upper layer: If not present, create a directory on the writable data filesystem at /mnt/lightwhale-data/lightwhale-state/overlay/upper/etc.

Finally use overlayfs to virtually merge the two layers and mount the overlay filesystem at /etc. This effectively replaces the immutable directory with a writable version!

Repeat for remaining key directories /var and /home.


[ad_2]
Source link

More on make linux servers fun again

Stay tuned for updates on make linux servers fun again as the story develops. Related: Researchers Turn Old Junk Drawer Smartphones Into a Mini Cloud Computing Platform.

Frequently Asked Questions

What is Lightwhale?

An immutable Linux system discussed in the article Make Linux servers fun again.

How does Lightwhale handle persistent data?

It mounts a data filesystem at /mnt/lightwhale-data, keeping all data in a single subdirectory that serves as the writable upper layer in an overlayfs stack with the immutable root as the lower layer.

What is the default data filesystem?

By default, Lightwhale mounts a volatile tmpfs. When persistence is enabled, the data filesystem is used instead.

Why does an immutable system need writability?

To install, configure, run containers, and write data, a writable filesystem is required, and changes must persist across reboots to be useful.

Views: 60

Post navigation

❮ Previous Post: Google Home warns users: Automations going away in May
Next Post: Apple iPhone 20: Everything We Know About the Drastic Redesign Coming in 2027 ❯

You may also like

Hello Developer: October 2025 – Discover
Blog
Hello Developer: October 2025 – Discover
April 26, 2026
Price and tax updates for apps, In-App Purchases, and subscriptions – Latest News
Blog
Price and tax updates for apps, In-App Purchases, and subscriptions – Latest News
May 2, 2026
Bringing Good Lock features to my Pixel
Blog
Bringing Good Lock features to my Pixel
May 31, 2026
Teaser videos take the Oppo Find X9 Ultra on adventures in Kyrgyzstan and Iceland
Blog
Teaser videos take the Oppo Find X9 Ultra on adventures in Kyrgyzstan and Iceland
April 22, 2026

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • OnePlus 16 Launch Date, Price, Specs: Everything Confirmed for 2026
  • Best 5G Phones 2026 for USA, UK & Europe (Every Budget)
  • Best Foldable Phones 2026: Z Fold 8 vs Pixel 11 Pro Fold vs Razr
  • Google Pixel 10 Review (2026): Still Worth $799?
  • iPhone 16 vs iPhone 17: Should You Upgrade in 2026? (Honest Answer)

Recent Comments

  1. I Hiked Using Robot Legs in the Grand Canyon. I Didn’t Even Need My Cane - Mobile & Accessories on Can Using the Hypershell Exoskeleton on a Bike Replace an E-Bike? I Tested It to Find Out
  2. The media starts receiving the first Trump Mobile T1 Phone units, launch is imminent - Mobile & Accessories on The Competitive Moat That AI Can’t Replicate
  3. Samsung’s giant The Frame Pro TV is $1,500 off until midnight - Mobile & Accessories on All Your Wearables Have One Glaring Weakness. What Can You Do About It?
  4. iPhone 18: Everything We Know About Apple's Most Ambitious Lineup Yet - Mobile & Accessories on This magnetic Qi 2.2 power bank is perfect for the iPhone 17 and it’s on sale right now
  5. Do Camera Sensor Sizes Matter? - Mobile & Accessories on Xiaomi 18 Pro set for a screen upgrade that Samsung fans will be very familiar with

Archives

  • October 2026
  • June 2026
  • May 2026
  • April 2026

Categories

  • Blog
  • Mobiles

Copyright © 2026 Mobile & Accessories.

Theme: Oceanly News by ScriptsTown