When I set "SectorSize" to 4096 and "StorageType" to "STGT_DISK_PNP", some applications can't access the disk. Why?
In PnP mode, the OS builds a stack of drivers on top of the CBFS Connect virtual disk driver (the one that is presented in PnP mode). The CBFS Connect driver reports the sector size as 4096 bytes, but some drivers in the stack change the reported value back to 512, causing the filesystem driver (which sits on the top of the stack) to receive the incorrect value of 512 bytes. Now, when applications works with files in nonbuffered mode, the file data will be aligned to a 512 byte boundary; but the drivers below the filesystem driver expect a 4096-byte granularity and so deny the file operation requests.
The only solution is not to change the sector size away from 512 bytes unless you have particular reasons to do so. Or, you can create a virtual filesystem in non-PnP mode.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at email@example.com.