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).
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 -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.
#mount -o log=NULL /dev/usbms0 /usbdev0
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 '
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
Include mount, backup, and umount commands in the backup scripts so that the majority of the time it is safely offline.
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
Here are a few useful examples that are relative to this article:
Dig deeper into AIX and Unix on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.