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

.zfs snapshots don't show date anywhere outside user pool #233

Open
danielkrajnik opened this issue Sep 17, 2022 · 6 comments
Open

.zfs snapshots don't show date anywhere outside user pool #233

danielkrajnik opened this issue Sep 17, 2022 · 6 comments

Comments

@danielkrajnik
Copy link

danielkrajnik commented Sep 17, 2022

Describe the bug
I am trying to find a quick way to see what date snapshots in the hidden .zfs/snapshots folder were made. I figured you can long list (ls -l) them in .zfs/snapshots directory, but timestamps only show correctly on user pool. Root .zfs snapshot directories show the same date rather than the date they were actually created.

Expected behavior
If it isnt possible to append the timestamp to snapshot name I'd like to know how to read creation timestamp on any .zfs snapshots folder.

For ubuntu users, please run and copy the following:

  1. ubuntu-bug zsys --save=/tmp/report
  2. Copy paste below /tmp/report content:
COPY REPORT CONTENT HERE.

Screenshots
If applicable, add screenshots to help explain your problem.

@richardelling
Copy link

richardelling commented Sep 18, 2022 via email

@danielkrajnik
Copy link
Author

danielkrajnik commented Sep 18, 2022

Thank you, that's true, but do you know if there is any reason why all creation timestamps show the same date everywhere except for my user's home .zfs/snapshots/*? Ive tried switching to root and they are still all the same.

@richardelling
Copy link

I don't understand your question. The creation timestamp is a dataset or snapshot property.

@danielkrajnik
Copy link
Author

danielkrajnik commented Sep 18, 2022

@richardelling I was hoping that it is possible to read creation date directly from the snapshot directories (inodes) rather than "zfs get creation". I've tried
zfs get creation /.zfs/snapshot/*, but "cannot open 'rpool/ROOT/ubuntu_...@autozsys...': snapshot delimieter '@' is not expected here"

ls -l did list creation date on the user home directory snapshots, but I dont know why it didnt on root directories.

@richardelling
Copy link

"seeing" the creation time in a stat structure is implemented, but not on Linux. See the details in openzfs/zfs#1133

So you'll need to see the creation property using the correct syntax: zfs get creation datasetname@snapshotname

@danielkrajnik
Copy link
Author

danielkrajnik commented Sep 19, 2022

thanks for explaining. Are you aware though of any way to append timestamp to the snapshots' name in zsys? That would be really helpful - could avoid a few extra steps of looking up the name --> creation date when accessing snapshots.

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