-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Hey, I got a few questions about mixing sector sizes and stacking of different logical and physical sector sizes.
I am currently testing a bit with iSCSI and the goal is basicly to have a storage node which exports multiple dm-writecache cached LVs via iSCSI to other clients (dm-writecache is used so the HDDs can spin down in most cases, ingest is small in my usecase), and the client use dm-cache to absorb peaks on a local NVMe to avoid using the slow network link as much as possible.
If all of my devices got 512B logical sector size the physical sector size shouldn't matter, ignoring the problems with atomicy?
(using dm-writecache to cache HDDs and NVMes)
My HDDs got 4096 physical sector size and 512 logical sector size, my NVMes got 512 physical and 512 logical sector size.
The resulting dm-writecached LVs got 4096 logical and physical sector size, as I use the 4096 blocksize so I dont need 8 times the RAM.
So I guess the block layer does the alignment in this case, so one 4096 request from everything on top of the dm-writecached LVs get aligned to 8x 512B requests, and therefore this part is safe?
Now the part where I dont know what to do, the caching device for the dm-cache also got 512 logical and physical sector sizes, but the imported iSCSI device (the one with dm-writecache) got 4096 logical and 4096 physical sector sizes, and right now I am thinking how to get the local cache aligned to the imported iSCSI block device.
Currently I got these possible solutions:
A: put ZFS on top of the imported iSCSI device and dont use dm-cache and use the internal L2ARC as I think ZFS does the alignment internally.
B: put a loopdev on top of the NVMe caching device with blocksize 4096 to align it to the 4096 physical and 4096 logical sector size.
C: put something like XFS / ext4 on the dm-writecached LVs on the storage node and use fileIO with a sparse file on the XFS/ext4 FS and set the blocksize in targetcli on the fileIO object to be aligned (in this case 512).
Thanks in advance!