Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid volume index value out of bounds" Question #15

Closed
reallyTG opened this issue Mar 27, 2020 · 5 comments
Closed

"Invalid volume index value out of bounds" Question #15

reallyTG opened this issue Mar 27, 2020 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@reallyTG
Copy link

reallyTG commented Mar 27, 2020

Hey!

I'm trying to use libfsapfs to mount an APFS external drive on my computer. Some diagnostic info:

OS: Mac OS 10.15.3
OSXFuse version: 3.10.4
libfsapfs version: 20191221
debug (-v) output below

Roughly, I've been following the instructions from this website: https://matt.sh/apfs-object-map-free-recovery

I've run into the following issue when trying to mount the disk:

> sudo /usr/local/bin/fsapfsmount -p <password> -v /dev/disk3 got

fsapfsmount 20191221

Unable to open source container
mount_handle_open: invalid volume index value out of bounds.

I'm not sure what to make of the error message "mount_handle_open: invalid volume index value out of bounds.". For what it's worth, I'm sure that disk3 is unmounted (I unmounted it with diskutil unmountDisk force).

Have you run into this issue before? I'd appreciate any pointers you might have.

Thanks!

@joachimmetz
Copy link
Member

how many file systems does your container have (fsapfsinfo)? You likely need to specify which file system you want to mount. Also see https://github.com/libyal/libfsapfs/wiki/Mounting#mounting

@joachimmetz joachimmetz added the question Further information is requested label Mar 28, 2020
@joachimmetz joachimmetz self-assigned this Mar 28, 2020
@reallyTG
Copy link
Author

Hey!

Thanks for getting back to me, I really appreciate it. And thanks for the pointers!

Your suggestion to specify the file system I want to mount worked, to a point. I was able to run:

sudo /usr/local/bin/fsapfsmount -f 1 -p <password> -v -X volicon=/Library/Filesystems/osxfuse.fs/Contents/Resources/Volume.icns /dev/disk3 got

(The -X <stuff> part is from the blog post I linked earlier, to deal with a missing iconpath). So this command ran for quite a long time, and I actually managed to see some (preliminary?) files appear in the got directory (I was able to ls them). But eventually, it error'd out with a big error (see attached error message).

When the command failed, /dev/disk3 was in a weird state and wasn't appearing in Disk Utility (thought the drive had a light on, indicating that it was somehow connected to the computer), and I had to force unmount it with diskutil unmount force /dev/disk3 to make it reappear.

Then I tried running sudo /usr/local/bin/fsapfsinfo -p <password> /dev/disk3 , and got the following output:

fsapfsinfo 20191221

Apple File System (APFS) information:

Container information:
  Identifier    : 7bae9f69-2c07-40a7-b74b-b2e40edb9664
  Number of volumes  : 4

Volume: 1 information:
  Identifier    : 6cc9a238-dde4-464e-8fe0-8186200bbfc3
  Name      : Macintosh HD

Unable to print container information.
libfsapfs_volume_superblock_read_data: invalid object type: 0x4000000d.
ibfsapfs_volume_superblock_read_file_io_handle: unable to read volume superblock data.
libfsapfs_internal_snapshot_open_read: unable to read volume superblock at offset: 5679198208 (0x15281b000).
libfsapfs_volume_get_snapshot_by_index: unable to open snapshot: 0.
info_handle_volume_fprint: unable to retrieve snapshot: 0.
info_handle_container_fprint: unable to print volume: 0.

Have you run into this issue before? Do you think the drive is somehow corrupted? I realize this is probably getting (very far into) the weeds, I'm just hopeful that you'll have some insight. If not, that's also cool!

Thanks so much for taking the time to help me debug this, APFS is such a frustrating file system format...

fsapfsmount_error.txt

@joachimmetz
Copy link
Member

joachimmetz commented Mar 30, 2020

libfsapfs_volume_superblock_read_data: invalid object type: 0x4000000d.

This is a libfsapfs safe guard indicating the data it is reading is not a valid volume superblock
But it looks likes a file system root block instead (also see https://github.com/libyal/libfsapfs/blob/master/documentation/Apple%20File%20System%20(APFS).asciidoc#44-object-types)

Do you think the drive is somehow corrupted?

Based on your description so far, is very likely or maybe the container is in a dirty state (which might not be handled properly yet). libfsapfs has a debug output build option which can generated tons of data format information. Also see: https://github.com/libyal/libfsapfs/wiki/Troubleshooting#verbose-and-debug-output

Could you provide me the debug output of:

sudo /usr/local/bin/fsapfsinfo -v -p <password> /dev/disk3 2> debug.log

@Faaiez
Copy link

Faaiez commented Jul 21, 2020

Hi

Sorry to hijack your post but I have a similar problem that might be the same problem.

MacOS 10.15.5
libfsapfs version: 20200416

I have an external 500Gb SSD that just stopped working.

Ran
sudo /usr/local/bin/fsapfsinfo -v /dev/disk3 2> debug.log

And output is as follows:

Unable to print container information.
libfsapfs_object_map_read_data: invalid object type: 0x00000003.
libfsapfs_object_map_read_file_io_handle: unable to read object map data.
libfsapfs_internal_volume_open_read: unable to read object map at offset: 3565625344 (0xd4872000).
libfsapfs_container_get_volume_by_index: unable to open volume: 0.
info_handle_get_volume_by_index: unable to retrieve volume: 0.
info_handle_container_fprint: unable to retrieve volume: 0.

When I run
sudo ./fsapfstools/fsapfsmount /dev/disk3 got

fsapfsmount 20200416

Unable to open source container
mount_handle_open: invalid volume index value out of bounds.

Then ran
sudo ./fsapfstools/fsapfsmount -f 1 /dev/disk3 got
fsapfsmount 20200416

Unable to open source container
libfsapfs_object_map_read_data: invalid object type: 0x00000003.
libfsapfs_object_map_read_file_io_handle: unable to read object map data.
libfsapfs_internal_volume_open_read: unable to read object map at offset: 3565625344 (0xd4872000).
libfsapfs_container_get_volume_by_index: unable to open volume: 0.
mount_handle_get_volume_by_index: unable to retrieve volume: 0.
mount_handle_open: unable to retrieve volume: 0.

Then ran
sudo ./fsapfstools/fsapfsmount -f 2 /dev/disk3 got
fsapfsmount 20200416

volicon: missing 'iconpath' option
Unable to create fuse handle.

Then ran
sudo ./fsapfstools/fsapfsmount -f 2 -X volicon=/Library/Filesystems/osxfuse.fs/Contents/Resources/Volume.icns /dev/disk3 got
fsapfsmount 20200416

Which just hung in terminal.

@joachimmetz
Copy link
Member

Closing since issue cannot be addressed without the requested debug output (per https://github.com/libyal/libfsapfs/wiki/Troubleshooting#verbose-and-debug-output)

Which just hung in terminal.

Per fsapfsmount -h:

	-v:          verbose output to stderr, while fsapfsmount will remain running in the
	             foreground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants