yadayada / acd_cli

An unmaintained command line interface and FUSE filesystem for Amazon (Cloud) Drive
Other
1.35k stars 167 forks source link

Mac OS finder shows size of 0 bytes for every file #245

Open yadayada opened 8 years ago

yadayada commented 8 years ago

See https://github.com/yadayada/acd_cli/issues/125#issuecomment-136527420

I don't have access to a Mac and can't get OS X running in a VM, so I would appreciate if anyone could investigate this.

zmwangx commented 8 years ago

Yes, I can reproduce:

screen shot 2016-01-19 at 11 59 43 pm

The problem is that files in Fuse don't seem to register in OS X's metadata store, a problem one can confirm by simply running mdls. For instance,

> file=/Users/zmwang/sync/acd/vid/event/apple/20111004-apple-special-event.mov
> mdls $file
/Users/zmwang/sync/acd/vid/event/apple/20111004-apple-special-event.mov: could not find /Users/zmwang/sync/acd/vid/event/apple/20111004-apple-special-event.mov.
> ls -sh $file
4.6G /Users/zmwang/sync/acd/vid/event/apple/20111004-apple-special-event.mov

I'm not sure why. Maybe it's OSXFUSE's fault.

By the way, trying to QuickLook a directory returns the size just fine.

screen shot 2016-01-20 at 12 11 11 am
zmwangx commented 8 years ago

Digging into mds a bit further, it seems that metadata server has trouble with the whole volume:

> mdutil -s ~/sync/acd
/Users/zmwang/sync/acd:
    Error: unknown indexing state.

From system logs:

1/20/16 12:38:41.888 AM mds[67]: (LSOF.Error:244) File '/Users/zmwang/sync/acd' (fd=33) left open on device 788529162
1/20/16 12:38:48.871 AM mds[67]: (Volume.Normal:2464) volume:0x7fd9548a5800 ********** Bootstrapped Creating a default store:1 SpotLoc:(null) SpotVerLoc:(null) occlude:0 /Users/zmwang/sync/acd
1/20/16 12:38:48.891 AM mds[67]: (Volume.Error:577) vsd:0x7fd95382f400 Open failed.  failureCount:0 (null)
...

whatever those means.

dany20mh commented 8 years ago

@yadayada I don't have this problem in the macOS (10.11.6) and it's showing all the file sizes so I think that's fixed because it wasn't like this before.

screen shot 2016-07-27 at 3 56 56 pm screen shot 2016-07-27 at 3 58 06 pm
daniloascione commented 8 years ago

It is due to OSXFUSE: mounting a volume with the auto_xattr option solves the issue, at least in my case (See https://github.com/osxfuse/osxfuse/wiki/Mount-options#auto_xattr). DISCLAIMER: I am not an acd_cli user.