Problem
While attempting to create an image backup, you receive the following error message:
Unable to write data to file
An error message will also appear in the INF.log file. The exact error message will vary depending on the cause and the destination device. Several examples are shown below:
Error writing to \\SERVER\share\Backup-w2-0x1-S400-2010-12-24-1954.TBI (Buf:05440000 CurFP:0 Bytes:4096 Err:8h) Error writing to \\server\share\catchweb.TBI (Buf:01950000 CurFP:93918820352 Bytes:59392 Err:5AAh)
This problem can affect all types of devices, but typically occurs with removable drives and NAS/Network devices.
Cause
Caching issues, file locking issues, and insufficient system resources can cause this problem.
Solution
Adjust Cache Settings (Image for Windows)
To change the cache settings Image for Windows uses, use the/po:nparameter (if running Image for Windows from the command line) or thePerfOpt=noption in the[Options]section ofIFW.INI (if running Image for Windows interactively). This option is used to manually control various file caching options of Image for Windows and Windows itself. The settings can have an impact on the overall performance and can be used to fix some driver-based problems as well.
The values forncan be as follows and combined using addition:
| Description |
| Disable default cache settings used by Image for Windows |
| Disable Write Cache on Removable Drives (only applies if 257 not used) - DEFAULT |
| Use smallest alignment (applies to version 2.59 or later) |
| Use Windows Cache on Writes |
| Use Windows Cache on Reads |
| Use Small Write cache on Backup |
| Use Small Write cache on Restore |
For example, users saving to an iPod and receiving the error "Unable to write data to file" should use the/po:0(orPerfOpt=0) option.
Network users may find some combination of values work better than what Image for Windows determines to use itself.
Note:Full details on configuringIFW.INIcan be found in theImage for Windows User Manual.
File Locking Issues (Samba)
If you receive this error when saving to a Samba share, it may be necessary to adjust the file locking settings to resolve it. Particularly, thestrict locking(disabled by default) andoplocks(enabled by default) settings may need to be disabled. If it's not desirable to completely disable oplocks, it may also work to disable them for the specific share being used or for the file type involved (e.g.veto oplock files = /*.tbi/).
Insufficient System Resources
The problem being caused by insufficient system resources is more likely to happen on older operating systems (e.g. Windows NT Server 4.0, Windows Server 2000, etc.). The specific error code can be found in the Image for Windows log file and is reported as a hex number (in the examples shown above, the error codes are 8h and 5AAh). Convert the error code to decimal (e.g. errors 8 and 1450) and look it up using this link:System Error Codes
The following Microsoft KB article may also be helpful in tracking down the specific issue:
Backup program is unsuccessful when you back up a large system volume