Sharing iSeries tape and optical drives with Linux

This topic discusses how to share optical drives with your integrated Linux® server.

Another advantage of using integrated Linux servers is the ability for Linux to share iSeries™ tape and optical devices. Your ability to use iSeries tape drives from Linux depends on the tape device model, tape controller, and media type. If you have logical partitions on your iSeries, a Linux server can only see the tape and optical drives that are allocated to the i5/OS™ partition where the server is hosted.

The main reason why you would share an iSeries tape drive with Linux is so that you do not need to buy additional tape drives specifically for Linux to use. All Linux servers can share an iSeries tape drive in the same host i5/OS partition, although not at the same time.

Each xSeries® server comes with its own optical drive. Therefore, Integrated xSeries Adapter-attached xSeries machines are unlikely to need to share an iSeries optical drive. An exception can be if the iSeries optical drive is a DVD-RAM device. However, at the time of writing, the Linux integration software did not support writing to DVD-RAM from Linux.

The Integrated xSeries Server does not come with its own optical device. Therefore, it is likely that you would need to share your iSeries optical device with your Integrated xSeries Servers.

Before you can use iSeries tape and optical devices from a Linux server, you must make the devices available to Linux. An iSeries tape device must first be made unavailable (varied off) before a Linux server can use it, whereas an optical drive must be made available (varied on) before Linux can use it.

The latest information on backup device support is available at:

http://www.ibm.com/servers/eserver/iseries/integratedxseries/linux/backup.html Link outside information center

Transferring control of an optical drive from i5/OS to Linux

Sharing an iSeries optical drive with Linux involves transferring control of the optical drive from i5/OS to Linux, and transferring control back from Linux to i5/OS.

To transfer control of an iSeries optical drive from i5/OS to Linux with CL commands, complete the following steps:

  1. On an i5/OS command line, use this CL command to check the status of the optical drives (you cannot check the status of an optical device using iSeries Navigator):
    WRKCFGSTS *DEV *OPT

    On the Work with Configuration Status display, find the optical device you want to transfer control of to Linux. Check that it is varied on. If not, type 1 next to the device and press Enter.

  2. To lock the optical device to Linux, start a Linux terminal session and log in as root.
  3. At the command prompt enter the ixsdev command and press Enter. The syntax is:
    ixsdev [-list] | [[-lock | -unlock] device name]

    For example, to list the tape and optical drives accessible by Linux enter the following command:

    ixsdev -list

    To lock OPT01 to Linux you would enter the following command:

    ixsdev -lock OPT01

    You could also use the Linux name:

    ixsdev -lock /dev/scd0

    The status of OPT01 shows as LOCKED.

    Note: In Linux, commands are case sensitive. Make sure you use the same case as in the examples. For example, use OPT01, not opt01.
  4. Because Linux sees optical drives as block devices, you need to mount the optical device (NOTE: If the optical device has been mounted, you will need to unmount the device before unlocking it.) :
    1. Create a mount point using the Make directory (mkdir) command. For example:
      mkdir /mnt/scd0
    2. Mount the optical device. For example:
      mount /dev/scd0 /mnt/scd0
After the optical drive has been logically switched to the integrated Linux server, you can use it in the same way as you would use an optical drive directly attached to a standalone Linux server.

Transferring control of an optical drive from Linux to i5/OS

To transfer control of an iSeries optical drive back to i5/OS all you need to do is unlock it in Linux. Note that if you either shut down the integrated Linux server before you unlock the optical drive, or the server fails before you unlock the optical drive, it unlocks automatically.

To transfer control of an iSeries optical drive back to i5/OS from Linux, complete the following steps:

  1. To unlock the optical drive from Linux, start a Linux terminal session and log in as root.
  2. At the command prompt enter the ixsdev command and press Enter. The syntax is:
    ixsdev [-list] | [[-lock | -unlock] device name]

    To unlock OPT01 from Linux you would enter the following command:

    ixsdev -unlock OPT01
    Note: In Linux, commands are case sensitive. Make sure you use the same case as in the examples. For example, use OPT01, not opt01.
  3. You could also use the Linux name:
    ixsdev -unlock /dev/scd0

    The status of OPT01 shows as UNLOCKED.

  4. On an i5/OS command line, follow these steps:
    1. Use the following CL command to check that the optical drive is still varied on:
      WRKCFGSTS *DEV *OPT
    2. On the Work with Configuration Status display, find the optical device you previously unlocked. Its status should be VARIED ON. If not, type 1 next to the device and press Enter.
You can now use the optical drive from i5/OS.