kimono-koans / httm

Interactive, file-level Time Machine-like tool for ZFS/btrfs/nilfs2 (and even Time Machine and Restic backups!)
https://crates.io/crates/httm
Mozilla Public License 2.0
1.38k stars 29 forks source link

After run of httm all snapshots remain mounted #96

Closed Halfwalker closed 11 months ago

Halfwalker commented 11 months ago

Before you begin

  1. Have you tried with the latest version of httm? YES
  2. Have you read the README and/or the help (httm -h or man httm)? YES

Describe the bug After running httm like httm -r file.txt and either hitting ESC or selecting a version to restore, all zfs snapshots from the current dataset remain mounted for around 10 minutes.

This is a root-on-zfs Ubuntu 22.04 system, with ZFS 2.1.6 from the jonathon (RIP :( ) PPA repo

❯ uname -r
6.2.0-35-generic

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

❯ zfs --version
zfs-2.1.6-0york1~22.04
zfs-kmod-2.1.9-2ubuntu1.1

Originally noticed with v0.26.x, so upgraded to 0.33.0 and same issue. On another system (Ubuntu 18.04 with httm v0.14.10) the issue does not happen. Oddly, on this 22.04 system v0.14.10 does exhibit the same issue. So it seems to be tied somehow to the Ubuntu 22.04 / ZFS 2.1.6 interaction ?

Snapshots appear as

❯ mount | fgrep zrepl | tail -2
ryzen22/home/alice@zrepl_2023-12-09_21:40:07 on /home/alice/.zfs/snapshot/zrepl_2023-12-09_21:40:07 type zfs (ro,relatime,xattr,posixacl)
ryzen22/home/alice@zrepl_2023-12-20_20:48:43 on /home/alice/.zfs/snapshot/zrepl_2023-12-20_20:48:43 type zfs (ro,relatime,xattr,posixacl)

After some period of time, the snapshots are unmounted. Maybe 10 minutes ? No indications of any errors in dmesg etc.

There are about 90 snapshots on the dataset

❯ zfs list -t all -H -o name -r ryzen22/alice/deano | wc -l
     90
kimono-koans commented 11 months ago

After running httm like httm -r file.txt and either hitting ESC or selecting a version to restore, all zfs snapshots from the current dataset remain mounted for around 10 minutes.

This is normal behavior and is non-detrimental. Well, 10 minutes is not normal. Remaining mounted for maybe 1 minute is normal. I'd guess your PPA uses a different auto-mounter script?

In any event, httm never does any snapshot mounting by itself. It always relies on an auto-mounter.

Anyway thanks for the bug report though!