On 11/7/25 3:20 PM, David C Rankin wrote:
On 11/6/25 5:01 PM, Pocket wrote:
I use the btrfs filesystem, I create a subvolume for version 1 and install the base packages and the "old version"  It is configured and boots and "runs" using systemd-nspawn.

I then create a subvolume for version 2, install the base packages and the "old version"  It is configured and boots and "runs" using systemd- nspawn.

I then can use machinectl to run/start a "version" and then I can shut it down and run the other, ie
machinectl start "version 1"
machine login "version 1"

when I am finished then

machinectl start "version 2"
machine login "version 2"

systemd containers are your friend

Thanks!

  That's something I've not looked into yet. I've avoided btrfs and stayed on ext4 --- I also run opensuse and lived through the development years when btrfs would regularly exhaust drive space leaving users without a usable system.

  It's matured, but there are also distros now dropping it, so that has been another ding against my trying it. The systemd container aspect does as a huge capability to its arsenal. I'll have to read up.



ls /var/lib/machines/
DNS  PiHole

 machinectl list
MACHINE CLASS     SERVICE        OS      VERSION ADDRESSES
DNS     container systemd-nspawn archarm -       -
PiHole  container systemd-nspawn archarm -       -     -

base packages are installed to DNS and PiHole.
bind is installed into the DNS subvolume and pihole is installed into the PiHole subvolume.
They are started at boot.

They are separate from the "Root" subvolume that the system boots to.

This keeps all the "services" separate from the boot system and I don't have the bind and pihole packages installed/mixed into the "root system".

I am currently creating a subvolume for nginx to provide web service to the local network.

btrfs subvolume list /mnt
ID 256 gen 9111 top level 5 path Root
ID 257 gen 9099 top level 5 path Home
ID 258 gen 8452 top level 5 path Pkgs
ID 259 gen 263 top level 256 path Root/var/lib/portables
ID 260 gen 9100 top level 256 path Root/var/lib/machines
ID 261 gen 9111 top level 5 path PiHole
ID 262 gen 263 top level 261 path PiHole/var/lib/portables
ID 263 gen 1005 top level 261 path PiHole/var/lib/machines
ID 264 gen 9110 top level 5 path DNS
ID 265 gen 1005 top level 264 path DNS/var/lib/portables
ID 266 gen 1005 top level 264 path DNS/var/lib/machines

Overall:
    Device size:                  27.31GiB
    Device allocated:              4.57GiB
    Device unallocated:           22.74GiB
    Device missing:                  0.00B
    Device slack:                    0.00B
    Used:                          2.35GiB
    Free (estimated):             24.65GiB      (min: 13.28GiB)
    Free (statfs, df):            24.65GiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:                7.53MiB      (used: 0.00B)
    Multiple profiles:                  no

Data,single: Size:4.01GiB, Used:2.10GiB (52.32%)
   /dev/mmcblk0p2          4.01GiB

Metadata,DUP: Size:256.00MiB, Used:129.83MiB (50.71%)
   /dev/mmcblk0p2        512.00MiB

System,DUP: Size:32.00MiB, Used:16.00KiB (0.05%)
   /dev/mmcblk0p2         64.00MiB

Unallocated:
   /dev/mmcblk0p2         22.74GiB

I have compress=lzo turned on all volumes

--
Hindi madali ang maging ako

Reply via email to