Adding SCSI Passthrough to CTL
Student: SurajPonugoti
Mentor : EdwardTomaszNapierala
Project Description
- This project is about exporting physical SCSI devices with all their features over iSCSI through CTL as an actual SCSI target. Presently, all the emulated devices in CTL are hard disk-like lun, but for this project we should pass actual SCSI devices through CTL.
Approach to solving the problem
- In ctl different emulations are represented by T_DIRECT, T_CDROM,T_SEQUENTIAL lun types. Similarly it requires a different lun type for representing actual SCSI devices.If required ctl.conf, ctld.c, kernel.c and ctl_frontend.c, ctladm has to be extended for the new lun type.In ctl.c we have to make sure that SCSI commands coming over iSCSI for SCSI device luns should be redirected to CAM xpt layer.
- iSCSI frontend submits the IO using the ctl_queue, and we need to create some kind of backend driver that will take those and submit them to CAM as a peripheral driver. We have to create a CTL based peripheral driver in CAM which accepts CCB(Command control block) from CTL. We have to make some changes to CTL, so that backend gets actualcommands and not just the IO, as other backends do.
- After Completing this project
- On the client machine side:
cd(4)or sa(4) <--> CAM transport layer <--> iSCSI initiator
CTL_iSCSI_frontend <--> ctl.c <--> CTL_passthrough_backend <--> CTL_based_CAM_peripheral driver <--> CAM transport layer <--> Physical drive
- On the client machine side:
Timeline:
- 23rd May-15th June: Getting familiar with the CTL code, CAM transport layer code, peripheral drivers code, SCSI commands, and going through the document.
- 15th June-26th June: Making changes to ctld and ctldadm. Creating a new CTL backend API that forwards CCB to CTL_based_peripheral driver in CAM.
- 27th June-3rd July: Midterm evaluation.
- 4th July-25th July: Create a new CTL_based_peripheral driver required to access actual SCSI device on the server side.Checking whether the response from the physical drive is directed back to client or not.
- 26th July-15th August: Testing with Linux and Windows as iSCSI initiators.
- 16th August-21st August: Scrub code and documentation.
Code Repository: