I think the above changed permissions but the error is still there and the disk does not open. I'll try this one.
How would one apply the script below with this file path ? /Volumes/D6_/D6.sparsebundle
I just realised that the size of the sparsebundle is very close to the capacity of the drive. 7.79 in an 8TB drive oops :S
# chflags -R nouchg MyImage.sparsebundle
# hdiutil attach -nomount -noverify -readwrite -noautofsck MyImage.sparsebundle
Enter the password to access „MyImage.sparsebundle“:
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 EFI
/dev/disk2s2 Apple_HFS
# hdiutil resize -size 1.5t MyImage.sparsebundle
Enter the password to access „MyImage.sparsebundle“:
# fsck_hfs -drf /dev/disk2s2
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive volume.
The volume name is Time Machine-Backups
** Checking extents overflow file.
** Checking catalog file.
** Rebuilding catalog B-tree.
…
# hdiutil detach /dev/disk2s2