Why is it that every time I start to write a blog post, I think of a title like: "I'm such an idiot." Well, if you're going to make a claim - like the claim that I should be the original face palm statue - I need to provide some evidence. Call it social proof.
Here it comes.
I was working on a site for a client with a small Power 8 system. Two VIOS, a handful of LPARs (sorry, I meant to say VMs) and they wanted to connect a fibre channel tape drive. Redundancy wasn't a big concern for them, so I decided to zone the drive to a fibre channel adapter on VIOS1. Then make it a vSCSI drive and bingo! Happy customer.
Logged into the VIOS in the restricted shell (that's logging in as padmin without using the naughty oem_setup_env). Discovered the new drive using cfgdev.
Is the drive there?
$ lsdev -type tape
name status description
rmt0 Available Other FC SCSI Tape Drive
As I already had a virtual SCSI adapter for connecting this tape drive for the LPAR to access, all I had to do was map the drive using mkvdev.
$ mkvdev -vadapter vhost8 -vdev rmt0 -dev tsm_rmt0
"rmt0" is not a valid backing device.
Wait a minute! I've done this before with a different tape drive. What did Dr. Google tell me:
virtual scsi tape drive aix
I found the IBM Technote on how to connect a virtual SCSI tape drive: http://www-01.ibm.com/support/docview.wss?uid=isg3T1011269
And then I walked through the requirements:
- VIOS v18.104.22.168 or higher (v22.214.171.124-FP20.1 is the minimum recommended) - Check
- Supports SAS-attached tape drives only
A fibre channel tape drive is not a SAS-attached tape drive.
So that must be what I did differently, last time it worked. I used a SAS tape drive.
What to do. (Here comes the social proof of my "I'm such an idiot" claim).
I rang the customer. "We need to get a fibre channel adapter dedicated for that TSM LPAR. Each of the two VIOS already has a dual-port FC adapter, but we can't have an adapter owned by both the VIOS and the TSM LPAR. The alternative is to shut down VIOS2, steal its FC adapter for TSM, and then just make all the disk run through VIOS1."
Customer was thinking. Tick, tick, tick. Working out the logistics of getting a spare FC adapter, ASAP. Was going to call me back.
... 5 minutes' later
"I'm such an idiot!"
Of course I don't need to buy a new FC adapter, because I don't have to use vSCSI to connect the FC tape drive. We could use NPIV. Simple. And you get to have redundancy by creating a VFC map on both VIOS.
I used Chris Gibson's article on Tips for implementing NPIV on IBM Power Systems.
All I had to do was add the VFC adapters on the VIOS and the LPAR.
Then delete the tape drive from the VIOS:
rmdev -dev rmt0
then unzone if from the VIOS and zone the tape drive to the two virtual FC adapters that are presented to the LPAR: one from each VIOS, which gives us redundancy.
I have no idea where the virtual FC adapter idea came from. Or rather, I have no idea why I didn't think about it at the start.
But once I thought of it, the customer was happy to know that there was not going to have to be a new FC adapter purchased and installed. It was all a whole lot easier. The only hard part was going back to the customer to tell them my discovery - about the VFC adapter ... and about myself.