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

ERROR: unable to resolve -c #32

Closed
NicoHood opened this issue May 23, 2017 · 8 comments · Fixed by #34
Closed

ERROR: unable to resolve -c #32

NicoHood opened this issue May 23, 2017 · 8 comments · Fixed by #34

Comments

@NicoHood
Copy link
Collaborator

NicoHood commented May 23, 2017

[arch@arch ~]$ sudo snap-sync -n
[sudo] password for arch: 
Select a mounted BTRFS device to backup to.
   1) c91384af-f210-48f5-ba19-d6415a1bb447 (/)
   2) c91384af-f210-48f5-ba19-d6415a1bb447 (/hackallthethings)
   3) c91384af-f210-48f5-ba19-d6415a1bb447 (/var/tmp)
   4) c91384af-f210-48f5-ba19-d6415a1bb447 (/data)
   5) c91384af-f210-48f5-ba19-d6415a1bb447 (/var/abs)
   6) c91384af-f210-48f5-ba19-d6415a1bb447 (/var/log)
   7) c91384af-f210-48f5-ba19-d6415a1bb447 (/var/cache/pacman/pkg)
   8) c91384af-f210-48f5-ba19-d6415a1bb447 (/home)
   9) c91384af-f210-48f5-ba19-d6415a1bb447 (/.snapshots)
  10) c91384af-f210-48f5-ba19-d6415a1bb447 (/srv)
  11) c91384af-f210-48f5-ba19-d6415a1bb447 (/home/arch/hackallthethings)
  12) c91384af-f210-48f5-ba19-d6415a1bb447 (/home/arch/.local/share/Steam)
  13) e5b8a2d6-85a1-4640-a659-acb8d6922bd6 (/run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6)
   0) Exit
Enter a number: 13

You selected the disk with UUID e5b8a2d6-85a1-4640-a659-acb8d6922bd6.
The disk is mounted at /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6.

Creating new snapshot for root...
Will backup //.snapshots/4641/snapshot to /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/backup/E744/root/4641//snapshot
Sending incremental snapshot for root...
ERROR: unable to resolve -c

No idea why this happens..

Without -n:

Creating new snapshot for root...
Will backup //.snapshots/4642/snapshot to /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/backup/E744/root/4642//snapshot
Continue with backup [Y/n]? y
Sending incremental snapshot for root...
ERROR: unable to resolve -c
[arch@arch ~]$ snapper list | grep -e snap -e backup
single | 4465 |       | Fri 12 May 2017 01:48:56 PM CEST | root |          | latest incremental backup                           | backupdir=Backup/E744, uuid=d2133005-da15-484f-9dbc-3352e6af0529
single | 4514 |       | Sun 14 May 2017 07:19:17 PM CEST | root |          | latest incremental backup                           | backupdir=backup/E744, uuid=e5b8a2d6-85a1-4640-a659-acb8d6922bd6
single | 4641 |       | Tue 23 May 2017 07:20:10 PM CEST | root |          | snap-sync backup in progress                        |                                                                 
single | 4642 |       | Tue 23 May 2017 07:21:08 PM CEST | root |          | snap-sync backup in progress                        |      
+ printf 'Will backup %s to %s\n' //.snapshots/4644/snapshot /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/backup/E744/root/4644//snapshot
+ tee /tmp/tmp.V6AaRo9lXE/snap-sync.out
Will backup //.snapshots/4644/snapshot to /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/backup/E744/root/4644//snapshot
+ cont_backup=K
+ [[ no == \y\e\s ]]
+ [[ -n K ]]
+ [[ K != [Yy]\e\s ]]
+ [[ K != [Yy] ]]
+ [[ K != [Nn]\o ]]
+ [[ K != [Nn] ]]
+ read -r -p 'Continue with backup [Y/n]? ' cont_backup
Continue with backup [Y/n]? 
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ '' != [Yy]\e\s ]]
+ [[ '' != [Yy] ]]
+ [[ -n '' ]]
+ mkdir -p /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/backup/E744/root/4644/
+ [[ -z 4514 ]]
+ tee /tmp/tmp.V6AaRo9lXE/snap-sync.out
+ printf 'Sending incremental snapshot for %s...\n' root
Sending incremental snapshot for root...
+ btrfs send //.snapshots/4644/snapshot -c //.snapshots/4514/snapshot
+ btrfs receive /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/backup/E744/root/4644/
ERROR: unable to resolve -c
[arch@arch ~]$ sudo btrfs subvolume list / | grep 4514
ID 11975 gen 352561 top level 259 path @snapshots/4514/snapshot
[arch@arch ~]$ ls //.snapshots/4514/snapshot
bin  boot  data  dev  etc  hackallthethings  home  hostrun  lib  lib64  lost+found  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[arch@arch ~]$ sudo btrfs sub list -auR / | grep 4514
ID 11975 gen 352561 top level 259 received_uuid - uuid d22e8c45-76cd-1e4f-bb1c-5dc37a51e313 path <FS_TREE>/@snapshots/4514/snapshot
ID 12054 gen 354514 top level 259 received_uuid - uuid 56fc424b-5d24-0c4c-8e51-c8467c4aaebf path <FS_TREE>/@snapshots/4548/snapshot
[arch@arch ~]$ sudo btrfs sub list -auR /run/media/arch/e5b8a2d6-85a1-4640-a659-acb8d6922bd6/ | grep 4514
ID 1557 gen 687 top level 5 received_uuid d22e8c45-76cd-1e4f-bb1c-5dc37a51e313 uuid 4904aefc-6884-e242-90c5-f70eb3b70f49 path backup/E744/root/4514/snapshot

18 commits to master since the last release. Maybe this fixed it already?

@NicoHood
Copy link
Collaborator Author

Looks like a btrfs bug!? The subvolume seems to be available to me. Also your script always worked before.
https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/btrfs-progs

@kalbasit
Copy link
Contributor

I'm also having the same issue, it used to work before as well.

@kalbasit
Copy link
Contributor

I deleted the latest incremental snapshot, and that forced a new sync, it worked. After the first sync, I tried again and it failed with the same message. I revert btrfs-progs to 4.10.2-1 and now I am getting:

sudo snap-sync -c @root -u e6437994-dced-4441-a3af-344694bb7f37

You selected the disk with UUID e6437994-dced-4441-a3af-344694bb7f37.
The disk is mounted at /mnt/Madea.

Initial configuration...

NOTE: Previous failed snap-sync backup snapshots found for '@root'.

Creating new snapshot for @root...
Will backup //.snapshots/715/snapshot to /mnt/Madea/snap-sync/cratos/@root/715//snapshot
Continue with backup [Y/n]? y

Performing backups...

Sending incremental snapshot for @root...
At subvol //.snapshots/715/snapshot
At snapshot snapshot
ERROR: cannot find parent subvolume
==> ERROR: 
Deleting old snapshot for @root...
Tagging new snapshot as latest backup for @root...

Done!

@kalbasit
Copy link
Contributor

With btrfs-progs 4.10 installed, I deleted the snapshots as previously mentioned, started a new snapshot and now it works again.

@NicoHood
Copy link
Collaborator Author

NicoHood commented May 24, 2017

@kalbasit I assume you also use ArchLinux? I will ask if we should open a bug at kernel.org or only for arch.

Edit: Which kernel do you use? I am using 4.11. Can you try the lts kernel? I currently have no hardware to test.

Edit2: I spoke with the archlinux TUs and they suggested me to report the issue upstream. Ref Signed-off-by: David Sterba <dsterba@suse.com> as he released the last btrfs-progs. Can someone do this please? I currently have no time over the weekend.

@kalbasit
Copy link
Contributor

@NicoHood yes I use ArchLinux and I do use linux-lts as my kernel. We should report it upstream. I checked the ChangeLog and there is some work for btrfs send and btrfs recieve, see https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git/log/

Did you file upstream or should I?

@NicoHood
Copy link
Collaborator Author

@kalbasit Alright, please file a bug and also refer to this topic. I am using linux-zen (4.11) and also have the issue.

@kalbasit
Copy link
Contributor

@NicoHood I sent an email to the mailing list for now, you can find it here. Let's wait to hear from them.

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

Successfully merging a pull request may close this issue.

2 participants