openzfs/zfs

`zfs diff` shows pathes prefixed by mountpoint path (and sometimes irrelevant)

Open

#4289 aperta il 30 gen 2016

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)C (1703 fork)batch import
Status: InactiveType: Featuregood first issue

Metriche repository

Star
 (9908 star)
Metriche merge PR
 (Merge medio 5g 21h) (62 PR mergiate in 30 g)

Descrizione

Pathes which are printed by zfs diff are not dataset-relative; they include the dataset mountpoint. This creates additional troubles when scripting around zfs diff.

Moreover, if one diffs between two snapshots, output pathes are prefixed by the real dataset mountpoints (and not the relevant snapshot mountpoints). This makes even more troubles as the backup script now needs to have knowledge of completely irrelevant mountpoints. This part is probably related to #3325.

Example:

# mount | grep '^datastore2/Internal[@ ]'
datastore2/Internal@2016-01-24 on /mnt/datastore2@2016-01-24/datastore2-Internal type zfs (ro,relatime,xattr,posixacl)
datastore2/Internal@2016-01-28 on /mnt/datastore2@2016-01-28/datastore2-Internal type zfs (ro,relatime,xattr,posixacl)
datastore2/Internal on /mnt/data/Internal type zfs (ro,relatime,xattr,posixacl)

# zfs diff -FH datastore2/Internal@2016-01-24 datastore2/Internal@2016-01-28 | head -n5
M       /       /mnt/data/Internal/Misc/transmissionbt/.git/objects/eb
M       /       /mnt/data/Internal/Misc/transmissionbt/.git/objects/98
M       /       /mnt/data/Internal/Misc/transmissionbt/.git/objects/4f
M       /       /mnt/data/Internal/Misc/transmissionbt/.git/objects/e6
M       /       /mnt/data/Internal/Misc/transmissionbt/.git/objects/26

That is, pathes printed by mount diff are inside neither of snapshot mountpoints. They reference /mnt/data/Internal (the real dataset mountpoint), which the script knows nothing about.

Guida contributor