Method error when changing vscsi path
AnthonyEnglish 270000RKFN Visits (9480)
chpath command to set the priority on a VSCSI disk.
Here's the command I ran:
chpath -l hdisk4 -p vscsi1 -a priority=2
And here's the unfortunate error I hit:
Madness in the method
No matter how long I work on AIX, I never get excited when I get a "Method error". Fortunately, this one was very easy to fix. I was simply missing a VSCSI map on the VIO server.
A little bit of background will help explain the problem and the solution.
Dual VIOS disk configuration
On a dual VIOS configuration with MPIO on the VIO Server, the LUNs are presented through two virtual SCSI adapters, one on each VIO server. (For more information on MPIO redundancy, see Janel Barfield's Advanced Power6 VIO Configurations.)
On the VIO client (the LPAR running AIX), you can run cfgmgr to discover the new disk and then set the parameters you want such as health check interval, queue depth and max_transfer size using chdev.
Then you run the chpath command to specify which VSCSI path you want for the priority. With two VSCSI adapters, both are set to priority 1, so you only need to change one of them to priority 2.
In this example, I thought I had two vscsi paths. vscsi0 (presented via VIOS 1) and vscsi1 (via VIOS2).
But when I went to change the path, I got that horrid method error.
The problem was that I had masked the LUN from Storage Subsystem to both VIO servers, but I hadn't run the mkvdev command on VIOS 2 to assign the LUN to the vscsi adapter on VIOS 2.
Leading up the path
Here's how I found that out:
A quick look at the paths for hdisk4 showed there wasn't one for vscsi1. I used the lspath command without any flags or arguments. This showed that there was a mapping for every hdisk through two VSCSI adapters (vscsi0 and vscsi1) ... every disk, that is, except for hdisk4.
You can get a more detailed view of the paths for hdisk4 using the -F flag of the lspath command
lspath -l hdisk4 -F"c
No entry for vscsi1, which is why the method error reported that "Invalid routine argument" error.
I logged onto the VIOS 2 as the user padmin and was able to identify the only LUN which hadn't been mapped using lspv -free. (It's one of those handy options on the VIOS lspv command. For more details about this, check out the earlier post vscsi disks on the loose: map 'em or scrap 'em.)
After creating the map using the mkvdev command, I logged onto the VIO client (the AIX LPAR) and ran cfgmgr. Now the new path showed up on vscsi1, and the chpath command worked, this time without any Method error.