Duplicated files become hidden in Finder

All your general support questions for OpenZFS on OS X.

Duplicated files become hidden in Finder

Postby evereasy » Fri Mar 19, 2021 6:01 pm

Version 2.0 March 14:
Observed the following -
1. When duplicate a file in Finder, the second copy is "hidden, Grey tag", the third copy is "hidden, Blue tag"
2. New screen shot files are hidden.

Screen Shot 2021-03-20 at 09.52.01.png
Screen Shot 2021-03-20 at 09.52.01.png (123.06 KiB) Viewed 4858 times
Last edited by evereasy on Fri Mar 19, 2021 6:18 pm, edited 2 times in total.
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Duplicated file becomes hidden in Finder

Postby evereasy » Fri Mar 19, 2021 6:08 pm

macOS version: Big Sur
Code: Select all
$ sw_vers
ProductName:   macOS
ProductVersion:   11.2.3
BuildVersion:   20D91

zfs version:
Code: Select all
$ zfs version
zfs-2.0.0-rc1_452_g964b2a6de7
zfs-kmod-zfs-2.0.0-rc1-452-g964b2a6de7

zfs file system configuration:
Code: Select all
$ zfs get -r all earth/Testbed | grep com.apple
earth/Testbed  com.apple.browse       on                      default
earth/Testbed  com.apple.ignoreowner  off                     default
earth/Testbed  com.apple.mimic        off                     default
earth/Testbed  com.apple.devdisk      poolonly                default

Output of xattr:
Code: Select all
$ ls -l time*
-rw-r--r--  1 eli  wheel  29 Mar 20 09:36 time copy 2.txt
-rw-r--r--  1 eli  wheel  29 Mar 20 09:36 time copy.txt
-rw-r--r--  1 eli  wheel  29 Mar 20 09:36 time.txt
$ xattr time*
xattr: [Errno 34] Result too large: 'time copy 2.txt'
xattr: [Errno 34] Result too large: 'time copy.txt'

References:
MAC OS filesystem: extended xattr FinderInfo,quarantine,ResourseFork TextEncoding
https://www.real-world-systems.com/docs/xattr.1.html
Last edited by evereasy on Sat Mar 20, 2021 12:49 am, edited 1 time in total.
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Duplicated files become hidden in Finder

Postby Jimbo » Fri Mar 19, 2021 8:11 pm

I can confirm - I see this too.

Same OS and ZFS versions.
Jimbo
 
Posts: 149
Joined: Sun Sep 17, 2017 5:12 am

Re: Duplicated files become hidden in Finder

Postby evereasy » Thu Mar 25, 2021 2:45 am

Thank you for the confirmation. Hope this can be resolved soon. I am checking this thread everyday... :D
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Duplicated files become hidden in Finder

Postby evereasy » Sun Apr 04, 2021 2:19 am

Tested again with 2021-04-03 version
viewtopic.php?f=20&t=3531
OpenZFSonOsX-2.0.0-Big.Sur-11.0.pkg

1. Still have problems
2. xattr * don't have errors now
3. xattr -l * - have errors - [Errno 34] Result too large

Don't know why zfs version (2021-04-03) is zfs-2.0.0-rc1_442_g816946801e ? The previous version (2021-03-14) is zfs-2.0.0-rc1_452_g964b2a6de7 .

Code: Select all
$ zfs version
zfs-2.0.0-rc1_442_g816946801e
zfs-kmod-zfs-2.0.0-rc1-442-g816946801e
$ pwd
/Volumes/earth/Testbed
$ ls -l
total 9
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 2.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 3.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 4.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 5.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 6.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 7.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy 8.txt
-rw-r--r--@ 1 evereasy  wheel  29 Mar 20 09:36 time copy.txt
-rw-r--r--  1 evereasy  wheel  29 Mar 20 09:36 time.txt
$ file *
time copy 2.txt: ASCII text
time copy 3.txt: ASCII text
time copy 4.txt: ASCII text
time copy 5.txt: ASCII text
time copy 6.txt: ASCII text
time copy 7.txt: ASCII text
time copy 8.txt: ASCII text
time copy.txt:   ASCII text
time.txt:        ASCII text
$ xattr *
time copy 2.txt: com.apple.FinderInfo
time copy 3.txt: com.apple.FinderInfo
time copy 4.txt: com.apple.FinderInfo
time copy 5.txt: com.apple.FinderInfo
time copy 6.txt: com.apple.FinderInfo
time copy 7.txt: com.apple.FinderInfo
time copy 8.txt: com.apple.FinderInfo
time copy.txt: com.apple.FinderInfo
$ xattr -l *
xattr: [Errno 34] Result too large: 'time copy 2.txt'
xattr: [Errno 34] Result too large: 'time copy 3.txt'
xattr: [Errno 34] Result too large: 'time copy 4.txt'
xattr: [Errno 34] Result too large: 'time copy 5.txt'
xattr: [Errno 34] Result too large: 'time copy 6.txt'
xattr: [Errno 34] Result too large: 'time copy 7.txt'
xattr: [Errno 34] Result too large: 'time copy 8.txt'
xattr: [Errno 34] Result too large: 'time copy.txt'
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Duplicated files become hidden in Finder

Postby lundman » Sun Apr 04, 2021 1:01 pm

Hmm that seems wrong - I will have to double check the version for BS
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Duplicated files become hidden in Finder

Postby lundman » Sun Apr 04, 2021 4:50 pm

OK its zfs-2.0.0-rc1-442-g816946801e as I've started squashing commits to put to the upstream PR. But yeah, that is an unfortunate side effect that suddenly the version is lower for the new build

Maybe i should artificially bump it to 2.0.1 or at least, rc2.
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Duplicated files become hidden in Finder

Postby lundman » Sun Apr 04, 2021 5:10 pm

Not seeing any xattr issues in my test cases. Could you start a test again from scratch, and also let me know the commands?
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Duplicated files become hidden in Finder

Postby evereasy » Sun Apr 04, 2021 7:56 pm

Thank you so much for investigating this issue. I redid my test with a newly created ZFS volume. The following is the steps that I performed -

1. Create an ZFS volume "tank" on an apfs volume, /Users/Space is on /dev/disk1s2 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
Code: Select all
# mkfile 1G /Users/Space/1G.raw
# zpool create tank /Users/Space/1G.raw
# zpool list
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
tank    960M   138K   960M        -         -     0%     0%  1.00x    ONLINE  -

2. Check current status, xattr is /usr/bin/xattr
Code: Select all
# cd /Volumes/tank
# ls
.fseventsd
# xattr .*
..: com.apple.FinderInfo
# xattr -l .*
..: com.apple.FinderInfo:
00000000  00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  |........@.......|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020

3. Create a file "time.txt" using vi
Code: Select all
# vi time.txt
# xattr -l time.txt
# ls -ld .
drwxr-xr-x  4 root  wheel  4 Apr  5 11:31 .
# chmod 777 .

4. Duplicate time.txt using Finder's "duplicate" function, right click "time.txt", select "duplicate"

5. Check the files with xattr
Note: There is an at sign (`@', symbolic link) at "time copy.txt" when run ls -l.
Code: Select all
# ls -l time*
-rw-r--r--@ 1 evereasy  wheel  29 Apr  5 11:31 time copy.txt
-rw-r--r--  1 root      wheel  29 Apr  5 11:31 time.txt
# xattr time*
time copy.txt: com.apple.FinderInfo
# xattr -l time*
xattr: [Errno 34] Result too large: 'time copy.txt'

6.using xattr -c can clear out the errors
Code: Select all
# ls -l time*
-rw-r--r--@ 1 evereasy   wheel  29 Apr  5 11:31 time copy.txt
-rw-r--r--  1 root       wheel  29 Apr  5 11:31 time.txt
# xattr -l time*
xattr: [Errno 34] Result too large: 'time copy.txt'
# xattr -c time*
# xattr -l time*
# ls -l time*
-rw-r--r--  1 evereasy   wheel  29 Apr  5 11:31 time copy.txt
-rw-r--r--  1 root       wheel  29 Apr  5 11:31 time.txt

ZFS version:
Code: Select all
# zfs version
zfs-2.0.0-rc1_442_g816946801e
zfs-kmod-zfs-2.0.0-rc1-442-g816946801e

macOS version:
Code: Select all
# sw_vers
ProductName:   macOS
ProductVersion:   11.2.3
BuildVersion:   20D91
evereasy
 
Posts: 30
Joined: Sat Feb 27, 2021 6:38 am

Re: Duplicated files become hidden in Finder

Postby lundman » Sun Apr 04, 2021 11:50 pm

Ah yes, ok, so getxattr with size=0 is supposed to return the size, not fail with ERANGE.

I believe I have that fixed. What's your preferred build for test?
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Next

Return to General Help

Who is online

Users browsing this forum: No registered users and 12 guests