PowerVC

PowerVC

Connect, learn, share, and engage with IBM Power.

 View Only

Registering Fibre Channel tape drives

By CHHAVI AGARWAL posted Thu January 10, 2019 08:12 PM

  
While PowerVC integrates with and manages most SAN storage providers, organizations often also need Fibre Channel tape drives to store backups and archives. Starting with PowerVC 1.4.2, administrators can register Fibre Channel tape drives in PowerVC, allowing PowerVC workloads to use tape drive volumes to perform backups. Attaching a tape volume in PowerVC enables virtual machines to automatically discover the drive. PowerVC does not create any volumes on the tape. Instead, it sets up zoning with the tape drive’s target port WWPNs so the tape volumes can be accessed. In this blog, we will show you how to register a Fibre Channel tape drive in PowerVC.

FC Tape Registration Utility

PowerVC 1.4.2 comes with a new utility powervc-tape-reg, which is used for Fibre Channel tape registration. The utility is found under /opt/ibm/powervc/bin/. Only the PowerVC administrator and OS root users have permission to execute this utility.
How it works
To register a tape drive, run the powervc-tape-reg command, specifying the following options:
-n: The tape drive’s display name
-p: One or more target ports for the tape drive. Separate multiple ports with commas. Target ports must be in a valid WWPN format of 16 hexadecimal digits grouped as 8 pairs separated by colons. PowerVC does not validate whether the specified ports are connected or logged in, so it’s the administrator’s responsibility to provide valid WWPN target ports. If the ports are not logged in, Fibre Channel tape drive volume discovery will fail later.
-c: Specify the total capacity of the tape storage device. This is only used to display the capacity information in the PowerVC console.
[root@vm-934 bin]# ./powervc-tape-reg -h
usage: powervc-tape-reg [-h]
    powervc-tape-reg -u USER_NAME -n DISPLAY_NAME -p TARGET_PORTS [-c CAPACITY]

The powervc-tape-reg command is used to register a tape FC Tape driver. This driver enables to zone a Tape library to a NPIV VM when it is deployed. It takes
name and target_wwpns to configure a new cinder-volume service in OpenStack using the tape FC Tape driver. NOTE: Using powervc-tape-reg command you can
register the same WWPN multiple times; but, it is not recommended.

optional arguments:
 -h, --help      show this help message and exit
 -u USER_NAME, --user USER_NAME
            PowerVC user for authentication. If this argument is not specified, user credentials are obtained from environment variables namely
            OS_USERNAME and OS_PASSWORD or assumed from whoami. The project used for registration is ibm-default.
 -n NAME, --name NAME specifies the user-friendly name given to registered storage device
 -p PORTS, --target-ports PORTS
            specifies the comma separated target ports of the FC tape storage device.
 -c CAP, --capacity CAP
            specify the total capacity in GB for the FC Tape device, Default=1024GB
[root@vm-934 bin]#

Below is an example command used to register a tape drive. During execution, it will prompt for the OS user password.

Once registered, we can see the FC tape storage on the PowerVC user interface on the Storage page:

Now we can start using the tape volumes for VM deployment and attachments.

FC tape drive volumes
Once the tape drive is registered to PowerVC, a user can zone Fibre Channel tape volumes. To clarify, even though the user interface allows tape volumes to be created, they are only placeholders that are used to enable NPIV VM zoning to FC tape target port WWPNs. They are not actual tape volumes on the back end. Once the zoning is done, virtual machines can discover the tape drives, which can then be used to boot a virtual machine. These volumes can then be used in deploy, attach, detach, migrate, and delete operations.

For each virtual machine, attaching a Fibre Channel tape volume creates a zone on the PowerVC registered fabric. If the virtual machine is deleted, the zone is also deleted. Virtual machines with attached tape volumes can discover the tape drives.
View the attached tape drives using the below commands:
[root@test-jag ˜]# lsscsi -g
[0:0:1:0]    cd/dvd  AIX      VOPTA                  /dev/sr0   /dev/sg0
[1:0:0:0]    disk    IBM      2145             0000  /dev/sda   /dev/sg1
[1:0:1:0]    disk    IBM      2145             0000  /dev/sdb   /dev/sg2
[1:0:2:0]    tape    IBM      ULT3580-HH6      E6R7  /dev/st0   /dev/sg5
[2:0:0:0]    disk    IBM      2145             0000  /dev/sdc   /dev/sg3
[2:0:1:0]    disk    IBM      2145             0000  /dev/sdd   /dev/sg4
[2:0:2:0]    tape    IBM      ULT3580-HH6      E6R7  /dev/st1   /dev/sg6


[root@test-jag ˜]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: AIX      Model: VOPTA            Rev:
Type:   CD-ROM                           ANSI  SCSI revision: 04
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: IBM      Model: 2145             Rev: 0000
Type:   Direct-Access                    ANSI  SCSI revision: 06
Host: scsi1 Channel: 00 Id: 02 Lun: 00 
Vendor: IBM      Model: ULT3580-HH6      Rev: E6R7
 Type:   Sequential-Access                ANSI  SCSI revision: 06
Host: scsi2 Channel: 00 Id: 02 Lun: 00
Vendor: IBM      Model: ULT3580-HH6      Rev: E6R7
Type:   Sequential-Access                ANSI  SCSI revision: 06

Un-register the FC tape driver
If a virtual machine with a tape volume that was attached by using PowerVC is unmanaged and re-managed, the zoning will be lost. Therefore it’s not recommended to unmanage and re-manage a virtual machine that uses tape drives.

To remove a Fibre Channel tape drive, you can use the PowerVC user interface or you can use the powervc-register command:
powervc-register -o remove -r storage -n

As you can see, PowerVC makes it easy to work with Fibre Channel tape drives. If you have any questions, post them below. And don’t forget to follow us on Facebook, LinkedIn, and Twitter!

Author: Chhavi Agarwal
#Storage
3 comments
32 views

Permalink

Comments

Fri February 19, 2021 03:28 AM

Hi,

our environment is pvc 1.4.4.2, storwize array, brocade fc switches. There are 2 ports on power host used, tagged as "host" in storage template.

Using 3rd and 4th FC port (tagged as "tape" for example) I would like to connect virtual tape library (to not interfere between backup/storage transfer). Storage template can include only "host" tagged ports. We are using initiator-vfc zoning policy.

  1. There is command powervc-tape-reg, is it possible to execute it through REST API? If so, is it possible to use with 3/4 port and not the storage ones?
  2. If no, is it possible to configure pvc so every LPAR will automatically receive individual NPIV WWPN on 3/4 FC "tape" ports so I can manually add proper zoning on switches?

Fri March 01, 2019 03:52 AM

Hello,
For an existing IBMi VM if we need tapeDrive connectivity, you just need to Onboard the VM and create one tape volume using PowerVC and attach to the IBMi VM. Once attached you should be able to login to the VM and discover the tape Drives.

Let us know if you have any more questions, we will be happy to help.

Thanks & Regards,
Chhavi Agarwal

Thu February 28, 2019 02:48 PM

Hi,
I try to configure a tape drive to my PowerVC 1.4.2.0 using the powervc-tape-reg
I'm able to see the tape as a Pluggable storage device on powerVC but I don't understand how to use it on an already deployed IBMi VM.