zfs diff returns error

Status
Not open for further replies.

trinxie

Dabbler
Joined
Feb 7, 2013
Messages
28
I have a problem when running "zfs diff", it returns an error "unable to determine path or stats for object 14 in...". See below. Anyone that have any idea what can be wrong?

I planned to use zfs diff to list all deleted files between today and last week.
I have tried to google this but I cannot get any clear answer.


[root@nas] ~# zfs diff MyVolume/BackupDS@auto-20130923.2000-3m MyVolume/BackupDS@auto-20131001.2100-3m
M /mnt/MyVolume/BackupDS/
Unable to determine path or stats for object 14 in MyVolume/BackupDS@auto-20130923.2000-3m: Invalid argument

>zfs list -r -t snapshot -o name,creation,used MyVolume/BackupDS
MyVolume/BackupDS@auto-20130923.2000-3m Mon Sep 23 20:00 2013 1.77M
MyVolume/BackupDS@auto-20130923.2100-3m Mon Sep 23 21:00 2013 96K
MyVolume/BackupDS@auto-20130924.1900-3m Tue Sep 24 19:00 2013 2.03M
....
MyVolume/BackupDS@auto-20130930.2000-3m Mon Sep 30 20:00 2013 0
MyVolume/BackupDS@auto-20130930.2100-3m Mon Sep 30 21:00 2013 0
MyVolume/BackupDS@auto-20131001.1900-3m Tue Oct 1 19:00 2013 3.90M
MyVolume/BackupDS@auto-20131001.2000-3m Tue Oct 1 20:00 2013 112K
MyVolume/BackupDS@auto-20131001.2100-3m Tue Oct 1 21:00 2013 256K

zfs status returns ok:
[root@nas] ~# zpool status
pool: MyVolume
state: ONLINE
scan: scrub repaired 0 in 2h55m with 0 errors on Mon Sep 23 05:55:58 2013
config:

NAME STATE READ WRITE CKSUM
MyVolume ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/9739b299-53ac-11e2-90ca-bc5ff4746c08 ONLINE 0 0 0
gptid/97ac85c3-53ac-11e2-90ca-bc5ff4746c08 ONLINE 0 0 0

errors: No known data errors
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403

trinxie

Dabbler
Joined
Feb 7, 2013
Messages
28
Thanks!
So it seems related to hard linked files or directories OR zfs diff bug?...

I did seach for all hardlink files in my dataset using:
find . -type f -a \! -links 1
Result: No hard linked files

As I understand It is hard to search for hardlinked directories, I will have not done this manually...

When I searched for my original problem I did find posts regarding zfs diff panic or deadlocks,. I was obviously not reading enough.
The following was taken from the link provided by paleoN:
There is probably nothing wrong with the snapshots. This is a bug in ZFS diff. The ZPL parent pointer is only guaranteed to be correct for directory objects. What you probably have is a file that was hard linked multiple times and the parent pointer (i.e. directory) was recycled and is now a file

I am not experienced enough to understand if I actually have a corrupt filesystem or that I have stepped into a zfs diff bug. I cannot understand the output from "zdb -vvv ...."

Can anyone else reading this try to run a zfs diff between two (distant) snapshots and see if it works ok or not?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
I am not experienced enough to understand if I actually have a corrupt filesystem or that I have stepped into a zfs diff bug. I cannot understand the output from "zdb -vvv ...."
I would say it's a zfs diff bug. FYI, you can point zdb to a particular object, i.e. 14, by appending it at the end of the command.
 
Status
Not open for further replies.
Top