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 on ubuntu 22.04.4 with setup-snapshot with fresh install #372

Open
Jason90909090 opened this issue Apr 17, 2024 · 4 comments
Open

Comments

@Jason90909090
Copy link

I have not been able to get dattobd working so I setup a fresh install of ubuntu and a fresh install of dattobd.
I try and initial test of
dbdctl setup-snapshot /dev/mapper/ubuntu--vg-ubuntu--lv /.datto 0

The command does not return any errors, but the following shows up in the syslog

Apr 17 19:59:37 lxzdc01 systemd-udevd[6716]: datto0: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/datto0' failed with exit code 1.

dbdctl transition-to-incremental 0

Apr 17 20:01:47 lxzdc01 kernel: [ 1081.525845] datto: error performing truncation: -1
Apr 17 20:01:47 lxzdc01 kernel: [ 1081.525888] datto: error truncating file: -1
Apr 17 20:01:47 lxzdc01 kernel: [ 1081.525904] datto: warning: failed to truncate '/.datto', incremental will use more disk space than needed

any idea why the error shows up or is it ok? I'm using another program with it urbackup which expects something to be mapped in /dev/mapper after the datto call, but i'm not sure if datto is working ok or it's urbackup

@Jason90909090
Copy link
Author

So did some more digging and that error may be ok? is that just an auto mapper command?
Either where i get a blocking error is after pointing to a loop device then trying to mount the following error comes up.

2024-04-18 18:50:04: ERROR: mount: /mnt/urbackup_snaps/f73bc4d475ce1aa1d7b0bff88667d9f945c77416aafc4464: wrong fs type, bad option, bad superblock on /dev/mapper/wsnap-f73bc4d475ce1aa1d7b0bff88667d9f945c77416aafc4464, missing codepage or helper program, or other error.

@Swistusmen
Copy link
Collaborator

Hi,
-What is the kernel version you are using?
-Error with truncation happens sometimes, we are working on improving this
-If it comes to the ERROR please provide me filesystem you are suing and command one by one so that I could reproduce it

@Jason90909090
Copy link
Author

Hi, glad to provide more info and thanks for looking into. Let me know if you need anything else or if there's a simplier test i should run.

Kernel 5.15.0.102-generic Ubuntu SMP
The system is using ext4
Just as an FYI this is a backup script with urbackup so i'm not fully versed on all the commands, but i was able to strip out the main ones to reproduce the error.

First simple create and detroy commands. No error on command line, but showing error messages in syslog. Not sure if they are valid.

dbdctl setup-snapshot /dev/mapper/ubuntu--vg-ubuntu--lv /.datto 0
Apr 22 14:38:46 lxzents01 systemd-udevd[4325]: datto0: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/datto0' failed with exit code 1.

dbdctl destroy 0
Apr 22 14:39:53 lxzents01 kernel: [ 1194.629585] datto: error unlinking file: -1

Backup script commands to produce mount error

dbdctl setup-snapshot /dev/mapper/ubuntu--vg-ubuntu--lv /.datto 0
truncate -s100M /.overlay
blockdev --getsize /dev/datto0
losetup -f (This output is used in the next command for losetup)
losetup /dev/loop5 /.overlay
echo "0 209715200 snapshot /dev/datto0 /dev/loop5 N 8" | dmsetup create wsnap-00
mount -o ro /dev/mapper/wsnap-00 /mnt/urbackup_snaps/wsnap-00

Error:
mount: /mnt/urbackup_snaps/wsnap-00: wrong fs type, bad option, bad superblock on /dev/mapper/wsnap-00, missing codepage or helper program, or other error.

Also the 209715200 comes from blockdev --getsize /dev/datto0 so adjust if you get something else.

Also on a side not i have another question, given the default install for ubuntu creates a /swap.img file does that make the .datto tracking files that much bigger? I noticed on this lab host i created to debug this backup issue if the machine is left in the snapshot state, the .datto file grows quickly and fills up the host even though the host is just a fresh ubuntu install so I'm assuming the normal file activity would be low.

@Jason90909090
Copy link
Author

Any updates or findings with this one?

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

No branches or pull requests

2 participants