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

The BE clone's source snapshot name should be more descriptive #13

Open
zhimsel opened this issue Mar 23, 2020 · 3 comments
Open

The BE clone's source snapshot name should be more descriptive #13

zhimsel opened this issue Mar 23, 2020 · 3 comments
Assignees

Comments

@zhimsel
Copy link
Collaborator

zhimsel commented Mar 23, 2020

Right now, the snapshot created to clone a BE dataset is named with just the date (e.g. ROOT/default@2020-03-23-14:46:49).

I'm thinking that the snapshot name should be one of the following:

  • name of the new BE (so @new_be for zectl create new_be)
  • @zectl_<be_name>
  • or at least optionally overridden by the user (via commandline flag or dataset property)

This would make it easier to identify what a snapshot's purpose is when looking at snapshot lists.

@johnramsden
Copy link
Owner

zectl as a prefix might be worth having, and it could be made changeable by a property.

Perhaps:

<ds>@<prefix>-<be_name>-<date>

Not sure what I think about sticking the BE name there... If one does want to find the snapshot that their dataset has been cloned from they can use:

zfs get origin <ds>

IE:

zfs get origin vault/sys/enix/ROOT/linux-lts-5.4.19
NAME                                  PROPERTY  VALUE                                            SOURCE
vault/sys/enix/ROOT/linux-lts-5.4.19  origin    vault/sys/enix/ROOT/default@2020-02-18-21:05:41  -

@zhimsel
Copy link
Collaborator Author

zhimsel commented Mar 23, 2020

If one does want to find the snapshot that their dataset has been cloned from they can use...

You could say the same for the date, too: zfs get creation <snap> :)

Personally, I don't find dates useful in "manual" snapshots (as opposed to automatically created ones, like via sanoid). However, I can see the merit to avoid namespace issues (say you have a BE named the same as a previous snapshot).

I like the @<prefix>-<be_name>-<date> format. I think zectl is a good default for <prefix>, which could, as you say, be made overrideable via a dataset property (or pool property?).

I just think the date-only snapshot name is way too vague if you're not looking at the clone itself. As far as I can tell, a snapshot has no property to indicate that it's an origin for a clone.

@johnramsden
Copy link
Owner

Yea, the date is mostly to make them unique.

I'll put this on my list of things to add 👍

@johnramsden johnramsden self-assigned this May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants