Loopback device

A loopback device is a device that can be used as a block device to access files.

The loopback file can contain an ISO image, a disk image, a file system, or a logical volume image. 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.

Use the loopmount command to create a loopback device, to bind a specified file to the loopback device, and to mount the loopback device. Use the loopumount command to unmount a previously mounted image file on a loopback device, and to remove the device. There is no limit on the number of loopback devices in AIX. A loopback device is never created by default; you must explicitly create the device. The block size of a loopback device is always 512 bytes.

A new device can also be created with the mkdev command, changed with the chdev command, and removed with the rmdev command. After a device is created, it can be either mounted to access the underlying image or used as a block device for raw I/O. Information about the underlying image can be retrieved with the ioctl (IOCINFO) command.

The following restrictions apply to a loopback device in AIX:
  • The varyonvg command on a disk image is not supported.
  • A CD ISO, and DVD UDF+ISO, and other CD/DVD images are only supported in read-only format.
  • An image file can be associated with only one loopback device.
  • Loopback devices are not supported in workload partitions.