The BE clone's source snapshot name should be more descriptive
zhimsel opened this issue · comments
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
forzectl 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.
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 -
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.
Yea, the date is mostly to make them unique.
I'll put this on my list of things to add 👍