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

Running without root on ZoL throws transient errors #258

Open
sevmonster opened this issue Jun 19, 2024 · 4 comments
Open

Running without root on ZoL throws transient errors #258

sevmonster opened this issue Jun 19, 2024 · 4 comments

Comments

@sevmonster
Copy link

sevmonster commented Jun 19, 2024

Under ZFS On Linux, it is not possible to mount ZFS filesystems even if you grant the mount permission to a user. For some reason, the maintainers of ZoL decided to raise an error in this situation, which causes zfs-autobackup to choke when creating parent and target datasets on the target host.

  #### Synchronising
  [Target] tank/neo: Creating filesystem and parents
! [Target] STDERR > filesystem successfully created, but it may only be mounted by root
! [Target] Command "ssh user@host 'zfs create -p target/tank/neo'" returned exit code 1 (valid codes: [0])
! [Source] tank/neo: FAILED: Last command returned error
  [Source] tank/neo: sending to target/tank/neo
  [Target] target/tank/neo@offsite1-20240619062656: receiving full
! [Target] STDERR > cannot open 'target/tank/neo': dataset does not exist
! [Target] STDERR > cannot receive new filesystem stream: unable to restore to destination
! [Target] Command "ssh user@host 'zfs recv -u -x refreservation -v -s target/tank/neo'" returned exit code 1 (valid codes: [0])
! [Source] tank/neo: FAILED: Last command returned error

This error specifically should be ignored under ZoL, since it is not fatal.

Re-running the same command will eventually create all the required parent and target datasets, so after another run or two, the errors will go away.

Lastly, a correction on the wiki: The permissions provided in the Running without root section are not always sufficient. You must also have the hold and userprop permissions for default operations to succeed.

  • You can live without hold if you are using --no-hold, and you can clear user props before sending with --filter-properties.
  • If you use --clear-mountpoint, you also need canmount, and readonly with --set-properties readonly=on.
@psy0rz
Copy link
Owner

psy0rz commented Jun 21, 2024

can you try with the latest v3.3 beta version? i has a different way of mounting.

@psy0rz
Copy link
Owner

psy0rz commented Jun 21, 2024

(i updated the running without root docs)

@sevmonster
Copy link
Author

Is the branch available on GitHub or has it been published elsewhere? I am not seeing it.

@psy0rz
Copy link
Owner

psy0rz commented Jun 26, 2024

nope the master is the latest.

or use pip install --upgrade zfs-autobackup --pre to get an actual release

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