Structs usually align their members on natural boundaries. This is often determined by the size of an int. Some systems can address off of natural boundaries and will allow you to pack the struct. See your compiler documentation for how to specify that. It's often a pragma. Systems that can't address off a natural boundary will give you a bus fault if you try.

The easy way to do it, regardless of packing, is to transfer each member individually. In that way, the information occupies only the amount of spaced actually used. Since a disk is a byte-oriented device, no alignment is necessary.

For a virtual disk, however, you may still have the memory alignment problems. Off-boundary byte operations such as the transfer of individual chars are handled, when necessary, by the hardware. This may involve reading multiple bytes from the destination, replacing a byte, and writing the multiple bytes back. This only has to occur, at worst, at the two ends of the transfer, in order to achieve alignment. The remainder are transferred in aligned groups.

I think you'll need to treat the destination as a 512-byte char array and transfer each struct member by casting it to char and transferring it as a char array to the desired index in the destination array.