Skip to content

"cd: none: No such file or directory" when target dataset not mounted #14

@candlerb

Description

@candlerb

simplesnap fails if the target zfs dataset is not mounted, with an obscure error:

# zfs create storage1/simplesnap
# simplesnap --host s1e --setname storage1 --store storage1/simplesnap --sshcmd "ssh -i /root/.ssh/id_rsa_simplesnap"
/usr/sbin/simplesnap: line 172: cd: none: No such file or directory

Once you know what the problem is, it is easily fixed: e.g.

# zfs set mountpoint=/var/backups/simplesnap storage1/simplesnap

But it would be nice if the script gave a more helpful error, and/or the documentation made it clearer that the target dataset must be mounted (anywhere). This requirement isn't obvious, because as far as I'm aware, zfs receive doesn't require the target to be mounted.

Looking at the script, I think that simplesnap only requires it so that it has somewhere to put its lockfile, and as a rough way to detect if the child dataset for the host exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions