jief666 / hdimount

Mount apple disk image (HFS, APFS, partitioned or not, compressed, encrypted) via Fuse
GNU General Public License v3.0
33 stars 2 forks source link

"No such file or directory" for getxattr #12

Open Nothing4You opened 1 year ago

Nothing4You commented 1 year ago

Might be related to #6, but I didn't see xattr in #6.

I have a Linux NAS with an SMB share that I use as Time Machine destination. Time Machine created an (encrypted) sparsebundle there with the following folder structure:

user@nas:~$ ls -la ~/media/TimeMachine/mac.sparsebundle
total 28
drwx------+ 1 user user    384 Mar 19  2022 .
drwxr-xr-x  1 user users  3148 Apr  3 14:53 ..
drwx------+ 1 user user   4110 Mar 22  2022 bands
-rw-r--r--+ 1 user user    516 Mar 22  2022 com.apple.TimeMachine.MachineID.bckup
-rw-r--r--+ 1 user user    516 Mar 22  2022 com.apple.TimeMachine.MachineID.plist
-rw-r--r--+ 1 user user   1374 Mar 22  2022 com.apple.TimeMachine.Results.plist
-rw-r--r--+ 1 user user   2440 Mar 22  2022 com.apple.TimeMachine.SnapshotHistory.plist
-rw-r--r--+ 1 user user    503 Mar 19  2022 Info.bckup
-rw-r--r--+ 1 user user    503 Mar 19  2022 Info.plist
-rw-------+ 1 user user      0 Mar  8  2022 lock
drwx------+ 1 user user   4110 Mar 22  2022 mapped
-rwx------+ 1 user user 122368 Mar  8  2022 token

Mounting this sparsebundle with hdimount, then using ls -l on the mountpoint I'm getting a bunch of No such file or directory messages from ls:

user@nas:~/mnt$ ls -l hdi/
ls: hdi/: No such file or directory
ls: hdi/backup_manifest.plist: No such file or directory
ls: hdi/2022-03-22-054702.previous: No such file or directory
total 8
drwxr-xr-x 6 root root  192 Mar 22  2022 2022-03-22-054702.previous
-rw-r--r-- 1 root root 7831 Mar 22  2022 backup_manifest.plist

Looking at the fuse debug logs I can see the No such file or directory errors are relating to getxattr calls:

user@nas:~/mnt$ hdimount -f -d ~/media/TimeMachine/mac.sparsebundle hdi
Password:
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.32
flags=0x03fffffb
max_readahead=0x00020000
   INIT: 7.19
   flags=0x00000011
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 2, success, outsize: 40
unique: 4, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 1840356
getattr /
   unique: 4, success, outsize: 120
unique: 6, opcode: GETXATTR (22), nodeid: 1, insize: 65, pid: 1840356
getxattr / security.selinux 255
   unique: 6, error: -2 (No such file or directory), outsize: 16
unique: 8, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 1840356
   unique: 8, success, outsize: 32
unique: 10, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 1840356
readdir[0] from 0
   unique: 10, success, outsize: 280
unique: 12, opcode: LOOKUP (1), nodeid: 1, insize: 62, pid: 1840356
LOOKUP /backup_manifest.plist
getattr /backup_manifest.plist
   NODEID: 2
   unique: 12, success, outsize: 144
unique: 14, opcode: GETXATTR (22), nodeid: 2, insize: 65, pid: 1840356
getxattr /backup_manifest.plist security.selinux 255
   unique: 14, error: -2 (No such file or directory), outsize: 16
unique: 16, opcode: LOOKUP (1), nodeid: 1, insize: 67, pid: 1840356
LOOKUP /2022-03-22-054702.previous
getattr /2022-03-22-054702.previous
   NODEID: 3
   unique: 16, success, outsize: 144
unique: 18, opcode: GETXATTR (22), nodeid: 3, insize: 65, pid: 1840356
getxattr /2022-03-22-054702.previous security.selinux 255
   unique: 18, error: -2 (No such file or directory), outsize: 16
unique: 20, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 1840356
   unique: 20, success, outsize: 16
unique: 22, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0
   unique: 22, success, outsize: 16
jief666 commented 1 year ago

But yes, it's probably related to time machine sparsebundle. Unfortunately, I'm won't be able to look into that in a near future... I think. Too bad. Sorry.

Nothing4You commented 1 year ago

no worries, just wanted to report it as i discovered it, i already managed to solve my particular use case with macos directly. time machine is unfortunately rather painful to use as it keeps breaking from time to time :( I also didn't find a way to access different snapshots from a time machine sparsebundle, with hdimount I was only able to see what I assume to be the latest snapshot.