Still more with the zfs external drive
By user12625760 on May 13, 2006
Progress of a kind. After some more careful analysis I have found why my USB disk reports ZFS checksum errors on the partitions that form part of the mirrors of the laptops and the obvious conclusion is that it was loosing data from the partition that is a stand alone pool!
The full horror is in bug 6424510 (nice trick that the bug viewer removes email headers from the report) so I have now downloaded the latest opensolaris source and have built a quick and dirty sd driver that will allow the ioctl to flush the write cache on the USB disk. This does open the possibility of having a device hang the device can't cope with the flush command, but that would be a broken disk. Anyway for me this solves my problem and makes my data safer until the real fix is available. The full solution will need to be much more than this and probably include a list both of the USB adapters and disk types to work out which combinations are safe to use. It saves me patching “un_f_sync_cache_supported” with mdb everytime I attach the disk.
Here are the diffs:
------- sd.c ------- 74c74 < #define SD_MODULE_NAME "SCSI SSA/FCAL Disk Driver 1.518" --- > #define SD_MODULE_NAME "SCSI SSA/FCAL Disk Driver 1.518 cjg 1.2" 77c77 < #define SD_MODULE_NAME "SCSI Disk Driver 1.518" --- > #define SD_MODULE_NAME "SCSI Disk Driver 1.518 cjg 1.2" 31121a31122,31126 > /\* > \* All disk support SYNC CACHE at first > \*/ > un->un_f_sync_cache_supported = TRUE; > 31133,31137d31137 < \* Fixed disk support SYNC CACHE < \*/ < un->un_f_sync_cache_supported = TRUE; < < /\*
This is a huge vote for ZFS though, any other file system just would not notice things were amiss.