Accessing the USB drive from IBM AIX on an IBM Power Systems server

This article explains the process to connect and mount a Universal Serial Bus (USB) drive on an IBM® Power Systems™ server from an IBM AIX® logical partition (LPAR).

Share:

Anuradha Podila (anpodila@in.ibm.com), IT Specialist, IBM

Image of AnuradhaAnuradha is working as a IT Specialist in IBM India Software Labs since October 2004. She has a good knowledge about the hardware and operating systems, which includes IBM Power Systems servers, IBM System x servers, IBM AIX, and Linux.



13 January 2014

Also available in Russian

Mounting USB drives in AIX on IBM Power hardware

Connect the external USB drive to the IBM Power Systems server. Mounting of USB drives is supported since AIX 5.3.

1. First, we need to ensure that the USB I/O drive is connected to the server. Assign the USB UHC Spec Adapter to the system through the Hardware Management Console (HMC).

Assigning the Universal Serial Bus UHC adapter

2. Verify that the following packages are installed on the server.

#lslpp -L |grep devices.common.IBM.usb
  devices.common.IBM.usb.diag
  devices.common.IBM.usb.rte

#lslpp -L |grep devices.usbif.08025002
  devices.usbif.08025002.diag
  devices.usbif.08025002.rte

3. Install the packages from the operating system if they are not installed on the server with installp.

#installp -a -d ./ devices.common.IBM.usb
#installp -a -d ./ devices.usbif.08025002

4. Now, check the USB devices.

#lsdev |grep usb
usb0       Available       USB System Software
usbhc0     Available 00-08 USB Host Controller (33103500)
usbhc1     Available 00-09 USB Host Controller (33103500)
usbhc2     Available 00-0a USB Enhanced Host Controller (3310e000)
usbms0     Available 2.1   USB Mass Storage
usbms1     Available 2.2   USB Mass Storage

5. Create a folder on the server to mount the USB drive.

#mkdir /usbdev0
#mount -o log=NULL /dev/usbms0 /usbdev0
#df -g

Filesystem   	GB blocks    Free   %Used  Iused %Iused Mounted on
/dev/hd4           0.25      0.17   32%     4162   10%  /
/dev/hd2           4.00      1.09   73%    45685   15%  /usr
/dev/hd9var        1.00      0.58   42%      720    1%  /var
/dev/hd3           1.00      0.94    7%     1763    1%  /tmp
/dev/hd1           0.25      0.25    1%       22    1%  /home
/dev/hd11admin     0.25      0.25    1%        5    1%  /admin
/proc                -         -    -         -     -   /proc
/dev/hd10opt       0.50      0.10   81%     5034   18%  /opt
/dev/livedump      0.25      0.25    1%        4    1%  /var/adm/ras/livedump
/dev/usbms0     2000.00   1716.15   15%        7    1%  /usbdev0

6. Create the file system for the USB drive.

# mkfs -V jfs2 -o ea=v2 /dev/usbms0

mkfs: destroy /dev/usbms0 (yes)?
File system created successfully.
3927736 kilobytes total disk space.
Device /dev/usbms0:
  Standard empty filesystem
  Size: 7855472 512-byte (DEVBLKSIZE) blocks

As you can see, the command initialized the USB flash drive. Now, enter Yes to destroy, or rather initialize, the device. To ensure that the file system is scalable, specify the 'ea' option.

We mounted Western Digital 'WDBACW0020HBK-UESN' Model, USB3/2 compatible 2 TB 'My Book' Essential external storage and IBM POWER5 processor-based server with AIX 6100-04 was used. This process can be used to mount USB external HDD and USB flash drives.

Unmounting USB drives

Make sure to umount the USB device after backup and before you remove the drive. Otherwise, you might have a corrupted file system and an unhappy AIX kernel.

# umount /usbdev0

Best practice

Include mount, backup, and umount commands in the backup scripts so that the majority of the time it is safely offline.

Limitation

Using the USB drives for data backup is not officially supported by IBM.

General usage of this setup

This kind of setup is mainly required in the following scenarios.

  • Back up and restore huge data from one server to another which is at a different location and network bandwidth between the servers is a constraint
  • If there is a need to back up and restore the server and no tape drive is available
  • If you need to back up the configuration files of the server

Resources

Here are a few useful examples that are relative to this article:

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=959966
ArticleTitle=Accessing the USB drive from IBM AIX on an IBM Power Systems server
publish-date=01132014