Edit: Some links no longer work
Originally posted July 11, 2017 on AIXchange
Have you booted LPARs from your USB ports? It was much easier than I thought it would be.
I had been a little worried after reading the intro to this article:
Note from the editor: There is limited USB support in AIX and only specific devices are supported. Other devices might work, but IBM does not support their usage. JFS2 file systems are not officially supported on USB devices, but you can try this at your own discretion.
I guess I should start from the beginning: Recently I was talking with someone who was having networking issues that prevented him from using his NIM server. He wanted to know if he could use a USB flash drive to install his LPAR instead. While this has been supported for quite a while (see here and here), I hadn’t taken the time to mess with it.
From the explanations in these posts (here and here), it seemed easy enough, though. We had a test machine, so we gave it a try.
First, we used dynamic LPAR (DLPAR) to get the USB controller attached to this test LPAR. On this system the adapter came up as Universal Serial Bus UHC Spec. After we attached it and ran cfgmgr, we verified that the device was there (usbms0 is what we were interested in).
# lsdev | grep -i 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.3 USB Mass Storage
Then we checked for a virtual CD or an .iso image that was mapped to this LPAR. No dice on either. So I decided to copy a physical DVD to the virtual media library and present that to the client LPAR:
# lsdev | grep cd
Nothing came back, so in the VIO server I ran:
mkvdev –fbo –vadapter vhost4
This set up the virtual optical device that was connected to the LPAR.
Then, with the physical CD loaded in the drive, I ran:
mkvopt –name aix7disk1.iso –dev cd0 –ro
This created the .iso image in the /var/vio/VMLibrary filesystem.
After it finished copying from the physical CD, I was able to load it in the virtual CD using:
loadopt –disk aix7disk1.iso –vtd vtopt6
(Note: vtopt6 was created earlier when I ran the mkvdev –fbo command.)
I was able to verify it was there by running:
lsmap –vadapter vhost4
Once the .iso image was mounted in the virtual optical device, I was able to log into the client LPAR and run cfgmgr. That made the cd0 device appear. It was linked to the .iso image in the virtual optical device by virtue of the loadopt command we ran earlier.
# cfgmgr
# lsdev | grep cd
cd0 Available Virtual SCSI Optical Served by VIO Server
Now that the LPAR had the source DVD (the AIX 1 DVD loaded into /dev/cd0) and the USB device (/dev/usbms0), I was ready to run the dd command:
# dd if=/dev/cd0 of=/dev/usbms0 bs=4096k
1010+1 records in.
1010+1 records out.
At this point, we were able to reboot the LPAR and go into SMS and get it to boot from USB. Booting took a bit longer than it would from a virtual optical device, but it still happened quickly enough.
This is a handy procedure if you need to load a VIO server onto a bare metal machine, for example. It’s especially valuable to know if you either don’t have an optical device or you’re using a split back plane and your optical device is connected to the other VIO server.
So how many of you have done this? What else are you doing with your USB drives?