ZFS CTL: need to provide an offset to a ZVOL-based LUN exported via iSCSI - how do I do it?

Hi,

OS: FreeBSD 12.3-RELEASE

I have an exported iSCSI-LUN (with CTL) that once was a member of a Linux MD-RAID1. The Linux MD-RAID1 does not exist anymore and I need to provide the once-mirrored virtual drive to MS Windows. Unfortunately, Linux has put its MD RAID metadata to the beginning of the LUN; the real drive data starts at offset 135266304 bytes.

How do I provide an offset while exporting a ZVOL-based LUN via iSCSI and using CTL as target demon? "pblockoffset" and "ublockoffset" don't work at all...



Many thanks and BR,
Nils
 
I don't know the specifics of CTL.

How big is the volume? You could create a copy of it using dd, with a "seek" value, so when reading the input dd skips over the first 129 MiB (which is what your offset is). Then serve the copy.
 
The iSCSI volume is 100TB (logicalused=79.7TB). Remaining space of the ZPOOL is 58TB, so a "dd iseek=" session is a little difficult right now... ;-)
 
Too bad. I was hoping it was a small 30GB boot volume.

You may have to read the source of CTL to find out, or to at such a feature. Or ask elsewhere on the Internet, there must be users of CTL outside of FreeBSD, lots of them.
 
Back
Top