Claudio Jeker: vscsi(4) and iscsid -- iSCSI initiator the OpenBSD way





The interactive transcript could not be loaded.



Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Uploaded on Apr 29, 2010

AsiaBSDCon 2010 paper session.

In the beginning large storage networks had to be built with Fibre Channel. Since Fibre Channel is expensive an alternative way to attach block-level devices to servers was searched. A protocol using Ethernet or TCP/IP would be a good cost-effective alternative since there is already an extensive Ethernet infrastructure available in data centers.

iSCSI is a protocol that transport SCSI commands and data over TCP. It combines two very popular protocols -- SCSI for block level I/O and TCP/IP for remote communication.

While many iSCSI implementations are inside the kernel the one implemented in OpenBSD is written in userland similar to the NetBSD initiator. But unlike NetBSD's, OpenBSD's version does not use a userland filesystem to hook the iSCSI disks into the kernel. Instead access is performed via vscsi(4) -- a virtual scsibus -- which allows userland to talk directly to the kernel SCSI midlayer. Vscsi is implemented in roughly 600 lines of code exporting the scsibus to userland via 6 ioctl(2) plus the possibility to use poll(2) or kqueue(2) to allow simple I/O multiplexing. The vscsi device uses these ioctls to issue commands and send or receive data from the kernel. The use of this interface it is fairly simple and makes it possible to write an iSCSI initiator in userland. The userland process can offload all the complex SCSI protocol handling to vscsi and the kernel and "only" needs to implement the session establishment and error recovery.

The presentation will give a quick introduction to the iSCSI protocol, the vscsi(4) interface is explained including sample code and the design and implementation of iscsid is illustrated.


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...