openzfs/zfs

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

Open

#4,289 opened on 2016年1月30日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)C (9,908 stars) (1,703 forks)batch import
Status: InactiveType: Featuregood first issue

説明

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.

コントリビューターガイド

`zfs diff` shows pathes prefixed by mountpoint path (and sometimes irrelevant) · openzfs/zfs#4289 | Good First Issue