Can use mount -o on AIX like Linux ?

If you are Linux Guy, you know that the mount command with option loop is the fast way to mount the ISO Image. This is example mount on Linux but its can’t be used on AIX :

Prior to AIX 6.1, I ever used dd command for the AIX 4.3 to 5.3 to access the files in ISO image file.
By used dd the ISO image file to copy the contains to a raw Logical Volume (rLV), then mount the LV as a filesystem.
Next heading are the steps for copying the ISO named dvd.iso into the directory/mnt/iso (generic JFS filesystem):

Mount ISO Image Prior to AIX 6.1 ( AIX 4.3 and upward )

  1. Find out the size of the ISO image

    by ls -l or ls -lh command depend on AIX version.
    As usual the DVD ISO image approximately 4.7 GB
    I have test only AIXV4.3, 5.1,5.3 but I think the old version (if not so far) also have ls ‘s option same as V4.3 too.

  2. Create read-only filesystems

    with size bigger then the size from step 1. , don’t mount the filesystem yet !.
    Then get the logical volume name associated with the new filesystem :

    The above output , LV name is format like ‘ lvxx’ ; where xx is the running no. 00,01,…

  3. Naming the logical volume manually

    for understanding in the future used, so create logical volume and then create filesystem later.

    1. lsvg to determine the PP size

      PP Size : 64 MB

      VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c9c87a00004c0000000138a145fcde
      VG STATE:           active                   PP SIZE:        64 megabyte(s)
      VG PERMISSION:      read/write               TOTAL PPs:      799 (51136 megabytes)
      MAX LVs:            256                      FREE PPs:       144 (9216 megabytes)
      LVs:                17                       USED PPs:       655 (41920 megabytes)
      OPEN LVs:           15                       QUORUM:         2
      TOTAL PVs:          1                        VG DESCRIPTORS: 2
      STALE PVs:          0                        STALE PPs:      0
      ACTIVE PVs:         1                        AUTO ON:        yes
      MAX PPs per VG:     32512
      MAX PPs per PV:     1016                     MAX PVs:        32
      LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
      HOT SPARE:          no                       BB POLICY:      relocatable

      #LPS = <LV_SIZE> / <PP_SIZE>, From above :  #LPS = ( 5120MB / 64MB ) = 80

    2. lsvg -l rootvg or lslv <<LV_NAME>> to check new logical volume exists or not ?

      LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
      hd5                 boot       1     1     1    closed/syncd  N/A
      hd6                 paging     32    32    1    open/syncd    N/A
      hd8                 jfslog     1     1     1    open/syncd    N/A
      hd4                 jfs        11    11    1    open/syncd    /
      hd2                 jfs        25    25    1    open/syncd    /usr
      hd9var              jfs        26    26    1    open/syncd    /var
      hd3                 jfs        25    25    1    open/syncd    /tmp
      hd1                 jfs        21    21    1    open/syncd    /home
      hd10opt             jfs        1     1     1    open/syncd    /opt
      lg_dumplv           sysdump    16    16    1    open/syncd    N/A

    3. Creates the logical volume
      mklv -y  <LV_NAME> <VG_NAME> <#LPs>

    4. Makes the filesystem, creates the mountpoint and puts it in /etc/filesystems
      -A no : File system is not mounted at system restart !
      crfs -v jfs -d <LV_NAME> -m <MOUNT_POINT> -A no

  4. Use dd command to raw copy

    the DVD image into rlv_dvd (raw lv_dvd) :

    Note must have r before lv_dvd, This is important !

  5. Mount the file system


    Note see option -v , Focus on Filesystem type !.

    1. crfs command above, where we used -v jfs
    2. mount command  use -v cdrfs
  6. Now access to files

    in /mnt/dvd_iso like DVD media.

  7. Unmount the filesystem

    make sure that your current directory not stay at /mnt/dvd_iso and don’t have any processes access that directory.

  8. Finally, you can remove the filesystem

    by following command :

    Not necessary, if you have more disk spaces i recommend to keep it for next used. You just only umount it in step 7 !.

Mount ISO Image on AIX 6.1 TL4 and upward

loopmount command is now available starting with AIX 6100-04-00-0943 (6.1 TL4), use the oslevel -s to check your current level.
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 image can be an ISO image, a disk image, a filesystem or a logical volume.
A loopback device can be created before mounting a file image using mkdev or the loopmount command can automatically create it.

According to the AIX 6.1 manuals on Infocenter, these are some restrictions to the loopback device:

  • varyonvg command on a disk image is not supported.
  • CD ISO, and DVD UDF+ISO, and other CD/DVD images are only supported in read-only mode
  • image file can be associated with only one loopback device.
  • Loopback devices are not supported in workload partition
  1. Mounting a File

    To mount a file on the loopback device, the loopmount command is used.
    Using the -l option assumes the loopback device already exists in /dev and the ODM classes.If the device doesn’t exist you can create it with mkdev:

    Then use loopmount with -i and -l options to mount into the filesystem tree.
    Remember unlike crfs the mount point directory must already exist !.

    During its existence the loopback device is listed in the CuAt, CuDv and CuDvDr ODM object classes.

  2. Unmounting a File

To unmount a ISO file mounted on the loopback device, use loopumount.
If use the regular umount command, the dynamically created loopback device will not be unconfigured.

Notice that since the loop0 device was created dynamically in the previous mount.
It will be deleted when not needed any more.

Recent Howto Mount ISO Image on AIX Search Terms:

  • - read an iso from aix (1)
  • - AIX mounting ISO image loopmount (1)
  • - https://www unix com/aix/177909-cant-boot-aix html (1)
  • - aix mount iso (1)
Howto Mount ISO Image on AIX
Tagged on: