Image File Fragmentation
NEW FastSeek
As of release v2026.02.08 we automatically enable FastSeek which virtually eliminates performance hit from using fragmented files. Please upgrade.
Old Information (prior to release v2026.02.08)
What?
If the image file on your SD card is fragmented it can impact the performance.
You will see a warning:
- file is fragmented, see https://github.com/BlueSCSI/BlueSCSI-v2/wiki/Image-File-Fragmentation
which leads you to this page.
Solution
Use release v2026.02.08
Copy files
- Copy all files off your SD Card.
- Delete all files off the SD card or do a Full format of the card
- Copy all the files over to your SD Card one at a time.
- The files should no longer be fragmented on the SD card.
Mac OS
Modern MacOS has extended attributes on files which can not be copied to FAT/exFAT file systems and cause fragmentation when attempting to copy. Here are a few work rounds:
- Copy the file without extended attributes and force a sync:
sync -f /Volumes/MySDCard
cp -X MyFileName.hda /Volumes/MySDCard/
sync -f /Volumes/MySDCard
or
- Remove extended attributes before copying files
- Open
Terminal - Run
xattr -c MyFileName.hda - Run
xattr -d com.apple.provenance MyFileName.hda- Can only be run from Terminal.app (not iTerm/etc)
- Copy via Finder or CLI.
- Open
Stop MacOS from placing metadata files:
It is also a good idea to stop MacOS from updating metadata files on the drive:
- Exclude the SD Card from Spotlight
System Settings->Siri & Spotlight->Spotlight Privacy...- Exclude the SD Card
- Disable
.DS_Storecreation on removable drives- Open
Terminal - Run
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
- Open
Defrag (Windows)
- Use a defrag utility like Defraggler to defrag the image file on the SD card.
Technical details
https://github.com/greiman/SdFat/issues/256#issuecomment-778795554
This wiki has been updated 915 times by 93 people like you! Click here to edit this page. Generated 2026-02-10