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 UtilityPowerVC 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 worksTo 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 volumesOnce 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 driverIf 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