Something broke my install after updating - need help restoring

So the installer gets it wrong… automagically. :face_with_raised_eyebrow:

Not wrong. Just not optimal.

The Installer’s Way:

  • Enable CoW and checksums across the entire volume
  • Set one exception for the swap file

Everything I’ve read says just make the whole swap subvolume nodatacow.

I bet they probably perform about the same. But it made sense to me that this way is better, it’s just cleaner isolation. (And saves you a command :smile: . ) Prevents snapshots and everything you don’t want as well.

(But I’ll never know, I only use partitions! hah.)

2 Likes

First line mounts the subvolume, the second mounts the file in the subvolume to swap? Or maybe they do the same thing..

/swapp/swapfile                              none                              swap    defaults                         0 0
sudo lsattr -l 
./swapfile                   No_COW

I didn’t do it manually, I think the command to create the swap file did it.

Indeed, it did. That’s exactly what that command does. It creates a file using mkswap, and then disables compression and copy-on-write on the file.

2 Likes

So, since the swapfile is in a subvolume and has nocow everything is good, right? It could be better creating a swap partition, but it’s a story for another time.

2 Likes

Before, this landed on your @ volume. But I assume you have the proper mount working now..

  • findmnt /swap – Handy command with btrfs and mounts

Sorry, I mean swapp.

What’s with the extra p anyway?

I guess I’m just not cool enough to have /roott and /swapp.. :sad_but_relieved_face:

It was on sale this week. :face_with_hand_over_mouth:

2 Likes

Gives no output

I have a LOT of extra p, if you need some I’ll hook you up, I mean, uppp

(1/1) Creating Timeshift snapshot before upgrade...
Using system disk as snapshot device for creating snapshots in BTRFS mode
Mounted '/dev/nvme0n1p2' (subvolid=0) at '/run/timeshift/2048/backup'
btrfs: Quotas are not enabled
Creating new backup...(BTRFS)
Saving to device: /dev/nvme0n1p2, mounted at path: /run/timeshift/2048/backup
Created directory: /run/timeshift/2048/backup/timeshift-btrfs/snapshots/2026-02-12_13-22-57
Created subvolume snapshot: /run/timeshift/2048/backup/timeshift-btrfs/snapshots/2026-02-12_13-22-57/@
Created subvolume snapshot: /run/timeshift/2048/backup/timeshift-btrfs/snapshots/2026-02-12_13-22-57/@home
Created control file: /run/timeshift/2048/backup/timeshift-btrfs/snapshots/2026-02-12_13-22-57/info.json
BTRFS Snapshot saved successfully (0s)
Tagged snapshot '2026-02-12_13-22-57': ondemand
------------------------------------------------------------------------------
Detecting snapshots ...
Found snapshot: 2026-02-12 13:22:57 | timeshift-btrfs/snapshots/2026-02-12_13-22-57/@ | ondemand       | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2026-02-12 00:00:01 | timeshift-btrfs/snapshots/2026-02-12_00-00-01/@ | daily          | N/A                                           |
Found snapshot: 2026-02-11 00:00:00 | timeshift-btrfs/snapshots/2026-02-11_00-00-00/@ | daily          | N/A                                           |
Found snapshot: 2026-02-10 00:00:01 | timeshift-btrfs/snapshots/2026-02-10_00-00-01/@ | daily          | N/A                                           |
Found snapshot: 2026-02-08 19:24:23 | timeshift-btrfs/snapshots/2026-02-08_19-24-23/@ | ondemand daily | {timeshift-autosnap} {created before upgrade} |
Found snapshot: 2026-02-08 12:55:05 | timeshift-btrfs/snapshots/2026-02-08_12-55-05/@ | ondemand       | Manualmente                                   |
if [ ! -e "${prefix}/grub-btrfs.cfg" ]; then
echo ""
else
submenu 'Manjaro Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
}
fi
Found 6 snapshot(s)
Unmount /tmp/grub-btrfs.gzgkf9xqsI .. Success
:: Elaborazione delle modifiche al pacchetto...
(1/1) aggiornamento in corso di manjaro-kde-settings                                [################################################] 100%
Nuove dipendenze opzionali di manjaro-kde-settings
    sddm-breath-theme [installato]
:: Esecuzione degli hook di post-transazione...
(1/1) Arming ConditionNeedsUpdate...

There’s some code in the output; automatic snapshot creation seems to work

This is where you need the extra p. (Where you mounted it.)

findmnt /swapp

You should see a SOURCE of something like:/dev/..p2[@swapp] and then all the other mount options like subvol=/@swapp,notdatacow(if you used it), to see if it’s correct.

2 Likes

I did add the extra p in konsole, I have no output (even as root).

 swapon --show 
NAME            TYPE SIZE USED PRIO
/swapp/swapfile file  16G   0B   -1
 findmnt /swapp 
 findmnt /swapp/swapfile 
                          

I’m still mounting the file, not the subvolume in fstab, like before.

If you don’t mount /swapp before creating the swap file, it won’t be in that specific subvolume. Obviously, you haven’t followed the instructions precisely enough.

There’s a difference between storing the file in the / subvolume or in /swapp.

:warning: You must first delete the file, then mount the subvolume, then recreate the file, and then correct the fstab file. Otherwise, you risk corrupting the file system or the swap file.

This is one of the reasons why a swap partition is preferred by many professionals.

3 Likes

Andreas is right.

And blank just means there’s no mount assigned to it.

What’s is your fstab line for @swapp? I know I suggested one for you a few posts back.

When troubleshooting mounts from your/etc/fstab, you can simply..

sudo mount /swapp
# Run test
sudo umount /swapp

It should mount automatically next reboot if the above works properly.

(And you need to make the swap file when it’s properly mounted.)

2 Likes

My subvolume is called swapp with 2 p because I had a folder called swap, so to be sure I added the extra p, I didn’t create a folder and named it swapp, I opened dolphin, went to /, right click, open terminal here (yes I like to use the GUI when possible) and then gave those commands exactly (except the path and size) as in the wiki

As I said before, I did it like the wiki, so I mount the file like this:

/swapp/swapfile                              none                              swap    defaults                         0 0

The file has nocow.
I asked if I should mount the subvolume and then the file like this example

or like this

or leave as it is now.

My subvolumes are

sudo btrfs subvolume list -t /                                                                                            1 ✘ 
[sudo] password di acca: 
ID      gen     top level       path
--      ---     ---------       ----
257     16922   5               @home
258     16857   5               @cache
259     16922   5               @log
264     16922   5               @
276     16734   5               timeshift-btrfs/snapshots/2026-02-07_13-22-58/@
279     16734   5               timeshift-btrfs/snapshots/2026-02-08_12-55-05/@
280     14983   5               timeshift-btrfs/snapshots/2026-02-08_12-55-05/@home
281     16734   5               timeshift-btrfs/snapshots/2026-02-08_19-24-23/@
282     15027   5               timeshift-btrfs/snapshots/2026-02-08_19-24-23/@home
283     16758   264             swapp
284     16758   5               timeshift-btrfs/snapshots/2026-02-10_00-00-01/@
285     15558   5               timeshift-btrfs/snapshots/2026-02-10_00-00-01/@home
286     16758   5               timeshift-btrfs/snapshots/2026-02-11_00-00-00/@
287     15996   5               timeshift-btrfs/snapshots/2026-02-11_00-00-00/@home
288     16758   5               timeshift-btrfs/snapshots/2026-02-12_00-00-01/@
289     16255   5               timeshift-btrfs/snapshots/2026-02-12_00-00-01/@home
290     16758   5               timeshift-btrfs/snapshots/2026-02-12_13-22-57/@
291     16359   5               timeshift-btrfs/snapshots/2026-02-12_13-22-57/@home
292     16758   5               timeshift-btrfs/snapshots/2026-02-13_00-00-00/@
293     16734   5               timeshift-btrfs/snapshots/2026-02-13_00-00-00/@home

The last snapshot is from today and it backed @ and @home, not swap (I’m sure I’ve not needed swap yet)

The swap subvolume should not be snapshotted.

4 Likes

You need two lines in your fstab for this, one to mount the subvolume, then another for the swap file. You are missing the former.

So this swap file is landing on your root volume still.

This line. Where do you mount subvol @swapp?


Edit

Sorry, I just noticed this. That won’t work quite yet.

I thought we were on the same page, so I made some assumptions.

There’s two things wrong with swapp, it should be off the top level subvolume. And we should call it @swapp not swapp. (Technically we don’t have to, but just to follow convention.)

So you will need to delete that subvolume and create a new one.

As it’s not off the top level, let’s just delete it by ID:

sudo btrfs subvolume delete --subvolid=283 /

And create the proper subvolume:

sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
sudo btrfs subvolume create /mnt/@swapp

Now, that second fstab entry should work!

2 Likes

It’s okay to do things in the GUI.

But please note that sometimes a recipe is intentionally designed not to work in the GUI because some steps require additional parameters, or because the GUI tools handle things differently.

2 Likes

Sorry I’ve been busy.
I’ve deleted the line from fstab, rebooted then:

sudo btrfs subvolume list -t /  
ID      gen     top level       path
--      ---     ---------       ----
257     20811   5               @home
258     20801   5               @cache
259     20811   5               @log
264     20811   5               @
279     20595   5               timeshift-btrfs/snapshots/2026-02-08_12-55-05/@
280     14983   5               timeshift-btrfs/snapshots/2026-02-08_12-55-05/@home
281     20595   5               timeshift-btrfs/snapshots/2026-02-08_19-24-23/@
282     15027   5               timeshift-btrfs/snapshots/2026-02-08_19-24-23/@home
290     20595   5               timeshift-btrfs/snapshots/2026-02-12_13-22-57/@
291     16359   5               timeshift-btrfs/snapshots/2026-02-12_13-22-57/@home
304     20595   5               timeshift-btrfs/snapshots/2026-02-19_23-00-00/@
305     19094   5               timeshift-btrfs/snapshots/2026-02-19_23-00-00/@home
306     20595   5               timeshift-btrfs/snapshots/2026-02-20_22-01-04/@
307     19161   5               timeshift-btrfs/snapshots/2026-02-20_22-01-04/@home
308     20593   5               timeshift-btrfs/snapshots/2026-02-21_23-00-00/@
309     19615   5               timeshift-btrfs/snapshots/2026-02-21_23-00-00/@home
310     20593   5               timeshift-btrfs/snapshots/2026-02-22_23-00-00/@
311     20100   5               timeshift-btrfs/snapshots/2026-02-22_23-00-00/@home
312     20593   5               timeshift-btrfs/snapshots/2026-02-23_23-00-01/@
313     20595   5               timeshift-btrfs/snapshots/2026-02-23_23-00-01/@home
314     20807   5               @swapp
UUID=ecbc0f71-e2df-4c2c-85a1-b83c7000eab8   /swapp                            btrfs   subvol=/@swapp,nodatacow,noatime    0 0
/swapp/swapfile                              none                              swap    defaults                         0 0

I’ve deleted the /swapp folder and the swapfile, as you know I have a lot of extra p so the new subvolume is still called swapp

Just did this, I should reboot.

Now it’s off the top level (subvolid=5), perfect.

You just have to mount the volume and enable swap. But that works too.

sudo systemctl deamon-reload
sudo mount /swapp
sudo swapon /swapp/swapfile

Or..

reboot
2 Likes

I make sure to have none, when I go out.

But why the unnecessary p swap is a proper description.

2 Likes

Yes, it’s always best to go before you go. :wink:

1 Like