I'm performing a storage migration between two fiber channel connected EMC arrays. I've already moved the data from the disks on the old array to the disks on the new array. Now I want to remove the old disks from the OS so the array can be un-zoned without the OS noticing and raising alerts because disks have disappeared. I really don't want to have to reboot to achieve this.

I can do this without issue with non-MPxIO disks, but for MPxIO disks my usual technique isn't working.

My usual technique is to use

luxadm -e offline /dev/rdsk/cXtXdXs2
devfsadm -Cvc disk

Here's an example. This is in my test lab which isn't connected to EMC arrays, but an old SENA (A5100), but it should work the same for any FC connected disks. As you can see it doesn't work at all

v480:root $ stmsboot -L | grep /dev/rdsk/c6t20000020371AC414d0
/dev/rdsk/c5t22d0       /dev/rdsk/c6t20000020371AC414d0
/dev/rdsk/c2t22d0       /dev/rdsk/c6t20000020371AC414d0
v480:root $ luxadm -e offline /dev/rdsk/c6t20000020371AC414d0s2
v480:root $ stmsboot -L | grep /dev/rdsk/c6t20000020371AC414d0
/dev/rdsk/c5t22d0       /dev/rdsk/c6t20000020371AC414d0
/dev/rdsk/c2t22d0       /dev/rdsk/c6t20000020371AC414d0

Trying to remove the underlying devices doesn't work either

v480:root $ luxadm -e offline /dev/rdsk/c5t22d0s2
Error: Invalid pathname (/dev/rdsk/c5t22d0s2)
v480:root $ luxadm -e offline /dev/rdsk/c2t22d0s2
Error: Invalid pathname (/dev/rdsk/c2t22d0s2)

Does anyone know how this is done?

  • I've always had to reboot. No idea on this. – ewwhite Jun 21 '15 at 21:18

I found the answer to this question in the Solaris docs. It boils down to unconfiguring (cfgadm -c unconfigure) the device using the device wwn given by cfgadm -al and cleaning up with devfsadm. The difficulty then is identifying the wwns that correspond to the MPxIO device you want to remove. This little script should print the device wwn and it's corresponding device file.

    fcinfo hba-port | awk '/HBA Port WWN: / { HBAwwn=$NF} /OS Device Name:/ {print $NF, HBAwwn}' | sed 's/\/dev\/cfg\///g' | while read ctlr HBAwwn
      fcinfo remote-port -sp $HBAwwn  | awk '/Remote Port WWN: / {rpwwn=$NF} /OS Device Name/ {print "'$ctlr'::" rpwwn, $NF}'


    c0::500000e010f3eaf2 /dev/rdsk/c0t1d0s2
    c0::500000e010f23c62 /dev/rdsk/c0t0d0s2
    c5::21000020371ac414 /dev/rdsk/c6t20000020371AC414d0s2
    c2::22000020371ac414 /dev/rdsk/c6t20000020371AC414d0s2

So here to drop /dev/rdsk/c6t20000020371AC414d0s2 you would run

    cfgadm -c unconfigure c5::21000020371ac414 c2::22000020371ac414
    devfsadm -Cvc disk

Oracle call MPxIO 'StorageTek Traffic Manager software' or STMS which made the docs harder to find.

The Solaris 11 equivalent docs are here. They look almost identical to the Solaris 10 ones. I haven't been able to find docs for earlier version but the lack of the fcinfo command and pre-leadville FC drivers must make it a real chore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.