User Tools

Site Tools


using_aix_loopback_devices

AIX loopback devices

In AIX 6100-04-00-0943 (6.1 TL4) support for a loopback device was added to AIX and VIOS (PowerVM). This device can be used as a block device to provide access to file images.

The file to be mounted can be an ISO image, a disk image, a filesystem image or a logical volume image. These images can be mounted into the filesystem tree via the /usr/sbin/loopmount command.

For example, by attaching a CD-ROM ISO image to a loopback device and mounting it, you can access the image the same way that you can access the CD-ROM device.

For that purpose I normally use the following little shell helper script:

lmount.sh
  1. #!/bin/sh
  2.  
  3. if [ $# != 2 ] ; then
  4. echo "lmount.sh <ISO-Image> <mnt-point>"
  5. exit -1
  6. fi
  7.  
  8. echo "Trying to loop-mount $1 at $2 ..."
  9.  
  10. /usr/sbin/loopmount -i $1 -o "-V cdrfs -o ro" -m $2
  11.  
  12. if [ $? != 0 ] ; then
  13. echo "FAILED!"
  14. exit -1
  15. fi

More details can be found here:

using_aix_loopback_devices.txt ยท Last modified: 2018/12/28 21:19 by mperzl