Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERRO: swapfc_path is located on an unknown filesystem #211

Open
unz3r0 opened this issue Feb 8, 2022 · 0 comments
Open

ERRO: swapfc_path is located on an unknown filesystem #211

unz3r0 opened this issue Feb 8, 2022 · 0 comments

Comments

@unz3r0
Copy link

unz3r0 commented Feb 8, 2022

I saw the same problem today. I checked after the whole system freezes. No idea how this happen actually, but here is how I solved it:

OS -> Manjaro
Packages -> timeshift timeshift-autosnap grub-btrfs systemd-swap
Filesystem -> BTRFS

Problem:

$ sudo systemctl status systemd-swap.service                                                                     
× systemd-swap.service - Manage swap spaces on zram, files and partitions.
     Loaded: loaded (/usr/lib/systemd/system/systemd-swap.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Tue 2022-02-08 21:45:50 CET; 13s ago
    Process: 2662 ExecStart=/usr/bin/systemd-swap start (code=exited, status=1/FAILURE)
   Main PID: 2662 (code=exited, status=1/FAILURE)
     Status: "Monitoring memory status..."
        CPU: 936ms

Feb 08 21:45:49 manjaro systemd[1]: Starting Manage swap spaces on zram, files and partitions....
Feb 08 21:45:49 manjaro systemd-swap[2662]: INFO: Removing working directory...
Feb 08 21:45:49 manjaro systemd-swap[2662]: INFO: Removing files in /var/lib/systemd-swap/swapfc/...
Feb 08 21:45:49 manjaro systemd-swap[2662]: INFO: Writing destroy info...
Feb 08 21:45:49 manjaro systemd-swap[2662]: INFO: swapD: pick up devices from systemd-gpt-auto-generator
Feb 08 21:45:49 manjaro systemd-swap[2662]: INFO: swapD: searching swap devices
Feb 08 21:45:50 manjaro systemd-swap[2662]: ERRO: swapfc_path is located on an unknown filesystem
Feb 08 21:45:50 manjaro systemd[1]: systemd-swap.service: Main process exited, code=exited, status=1/FAILURE
Feb 08 21:45:50 manjaro systemd[1]: systemd-swap.service: Failed with result 'exit-code'.
Feb 08 21:45:50 manjaro systemd[1]: Failed to start Manage swap spaces on zram, files and partitions..

sudo btrfs subvolume list  /
ID 257 gen 142377 top level 5 path @home
ID 310 gen 139209 top level 5 path @swap
ID 824 gen 141132 top level 5 path timeshift-btrfs/snapshots/2021-12-19_22-51-31/@
ID 1244 gen 108447 top level 824 path timeshift-btrfs/snapshots/2021-12-19_22-51-31/@/var/lib/systemd-swap/swapfc
ID 1264 gen 142377 top level 5 path @
ID 1294 gen 142377 top level 5 path timeshift-btrfs/snapshots/2022-02-08_21-43-00/@

Timeshift did a snapshot of the swapfc path and systemd-swap use the backup path somehow...

  1. I needed to delete this subvolume:
sudo btrfs subvolume delete  /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-19_22-51-31/@/var/lib/systemd-swap/swapfc
  1. Remove the folder:
sudo rm -Rf /var/lib/systemd-swap/swapfc
  1. Start again:
sudo systemctl start systemd-swap.service 
sudo systemctl status systemd-swap.service  

Now it works again.

$ sudo btrfs subvolume list  /                                                                           ✔ 
ID 257 gen 142402 top level 5 path @home
ID 310 gen 139209 top level 5 path @swap
ID 1264 gen 142402 top level 5 path @
ID 1295 gen 142389 top level 1264 path var/lib/systemd-swap/swapfc

(I deleted also all snapshots, just in case)

I guess systemd-swap has not timeshift in mind:

https://github.com/Nefelim4ag/systemd-swap/blob/6e4fd335714adf34c0d50b5c1ea58af5a60cc2d6/src/systemd-swap.py#L280-L292

Please add some safety checks, so that it chooses the swapfc path on @ and not on timeshift-backup. Thank you :-)

(And TimeShift need to exclude this path somehow. No idea, how this works here. But it seems BTRFS Snapshots have no Filter like in rsync mode.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants