You are not logged in.

#1 2023-11-02 17:14:55

Mohs9n
Member
From: Egypt
Registered: 2021-12-26
Posts: 9

Can't create snapper config

I'm trying to setup snapper but when i run

sudo snapper -c root create-config /

i get the error:

Creating config failed (creating btrfs subvolume .snapshots failed since it already exists).

and when i try to delete the .snapshots subvolume i get:

sudo btrfs subvolume delete /.snapshots
Delete subvolume (no-commit): '//.snapshots'
ERROR: Could not destroy subvolume/snapshot: Invalid argument

Last edited by Mohs9n (2023-11-02 17:45:49)

Offline

#2 2023-11-02 17:32:59

ajgringo619
Member
Registered: 2023-05-06
Posts: 18

Re: Can't create snapper config

Your command is incomplete:

sudo snapper -c root create-config /

Does /.snapshots have anything in it? If not, then delete it before trying again:

sudo rm -rvf /.snapshots

Last edited by ajgringo619 (2023-11-02 17:37:27)

Offline

#3 2023-11-02 17:48:16

Mohs9n
Member
From: Egypt
Registered: 2021-12-26
Posts: 9

Re: Can't create snapper config

ajgringo619 wrote:

Your command is incomplete:

sudo snapper -c root create-config /

Does /.snapshots have anything in it? If not, then delete it before trying again:

sudo rm -rvf /.snapshots

Yeah sorry, i had the / in the terminal but forgot it in the post
and .snapshots is empty and i tried to delete it with rm but i get

rm: cannot remove '/.snapshots/': Device or resource busy

Offline

#4 2023-11-03 07:35:42

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: Can't create snapper config

Mohs9n wrote:
rm: cannot remove '/.snapshots/': Device or resource busy

That means that it's being used by a process, post the output of

lsof +D /.snapshots/

That's should return the Process ID, if you ensure that the process isn't important for the correct system operation, then you can kill it.

Last edited by Khere (2023-11-03 07:37:42)


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#5 2023-11-03 15:05:19

Mohs9n
Member
From: Egypt
Registered: 2021-12-26
Posts: 9

Re: Can't create snapper config

Khere wrote:
Mohs9n wrote:
rm: cannot remove '/.snapshots/': Device or resource busy

That means that it's being used by a process, post the output of

lsof +D /.snapshots/

That's should return the Process ID, if you ensure that the process isn't important for the correct system operation, then you can kill it.

running it without sudo exited with an error without printing anything

sudo lsof +D /.snapshots/
[sudo] password for mohsen: 
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
      Output information may be incomplete.

Offline

#6 2023-11-06 08:18:57

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: Can't create snapper config

Try to execute

sudo lsof +D /.snapshots/ -e /run/user/1000/gvfs && sudo lsof +D /.snapshots/ -e /run/user/1000/doc

You must execute the command when you are in to the directory that contains the .snaphsots directory


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#7 2024-11-22 14:24:57

Plevi1337
Member
Registered: 2024-11-22
Posts: 1

Re: Can't create snapper config

I've had the same issue, and only could find this post that was even closely relevant to what I was doing.

For me the solution was on the arch wiki. 
https://wiki.archlinux.org/title/Snapper / 2 Creating a new configuration / Note:

ArchWiki wrote:

Note: If you are using the suggested Btrfs partition layout from archinstall then the @.snapshots subvolume will already be mounted to /.snapshots, and the snapper create-config command will fail [1]. To use the @.snapshots subvolume for Snapper backups, do the following:

    Unmount the @.snapshots subvolume and delete the existing mountpoint.
    Create the Snapper config.
    Delete the subvolume created by Snapper.
    Re-create the /.snapshots mount point and re-mount the @.snapshots subvolume.

Offline

#8 2024-11-22 14:56:09

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,417
Website

Re: Can't create snapper config

Mod note: closing this old, abandoned topic.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB