F Managing Disk Images Used Within the EnterpriseOne VMs

You can use the Linux Logical Volume Manager (LVM) to manage disk images used within the JD Edwards Virtual Machines (VM). The procedures in this appendix demonstrates how to extend the current disk file system by creating a new disk image, creating a physical volume, and then adding the physical volume to the existing logical volume.

This appendix discusses these topics:

Caution:

It is highly recommended that you backup the JD Edwards EnterpriseOne application image file before executing the procedures in this appendix.

F.1 Creating a New Disk Image

The current verions of the JD Edwards EnterpriseOne VM templates are delivered as a single disk image paired with a single disk system image to create a fully functioning application. A configure file named vm.cfg is also included with each set of images, and is used to provide instruction to the VM Server on such things as number of Virtual CPU, memory, and certain file locations.

To create a new disk image:

  1. Use the Linux disk command ls to show the content of a application directory.

    Surrounding text describes lvm_create_disk_image.gif.
  2. Create the new disk image that will be used in the VM application by executing the dd command to create an empty file. The following shows an example command string to create an empty 10GB file named disk2.img.

    dd if=/dev/zero of=disk2.img bs=1 count=1024 seek=10GB

    Surrounding text describes lvm_create_disk_image_2.gif.

See Also

  • For more information refer to the Linux man pages for the dd command.

F.2 Updating the vm.cfg File to Add the New Disk Image

To update the vm.cfg file to add the new disk image that you created in the previous section:

  1. You need to update the vm.cfg file with the name and location of the new image. In the example below, the new disk (disk2.img) image is added as the last line in the disk section with the designation of hdc.

    'file:/OVS/development/system58/disk2.img,hdc,w',1

    Surrounding text describes add_new_disk_image_1.gif.
  2. Save the updated vm.cfg file.

  3. You can review available disk space on the system prior to adding the new disk image by running the df -h command.

    Surrounding text describes add_new_disk_image_2.gif.
  4. Start the VM using the xm create to create the new disk image in the VM.

    Note:

    The following example uses the command xm create from the command line. Alternately you can use the OVM Manager to start the VM from the OVM GUI console.

    xm create vm.cfg

    Surrounding text describes xm_create.gif.
  5. Once the VM is up and running, sign into the 'root' user account.

See Also

  • Refer to the Oracle VM Server User Guide for more details on the content of the vm.cfg file.

F.3 Creating a Partition Table

To make the disk image usable, you must create a partition table. This is done using the fdisk command.

To create a partition table:

  1. Verify that the new disk image (in the example in this guide disk2.img) has been attached to the running VM, and the name of the new file device (hdc) by running the fdisk -l command from the command line as shown below.

    Surrounding text describes fdisk.gif.
  2. To create a partition table, instead of using the -l option, replace it with the disk device. For example, in the example used in this guide is hdc.

    fdisk /dev/hdc

  3. Next, at the prompts from the fdisk command, enter the following command letters to create primary partition #1:

      n
      p
      1
      <enter>
      <enter>
    
    Surrounding text describes fdisk_prompts.gif.
  4. This process created a new device hdc1 which is the first partition on the hdc disk device. Since this new disk will be part of a logical volume, the disk type must be set to 8e which indicates that this partition is for Linux LVM. While still within the fdisk command prompts, enter the following commands.

        t
        8e    
    
  5. The next command writes these changes out to the disk images and exits the fdisk program.

        w
    
    Surrounding text describes fdisk_write_exit.gif.

See Also

  • For more information refer to the Linux man pages for the fdisk command.

F.4 Creating a New Physical Volume with the New Disk Image

After you create a partition table as described in the previous procedure, the disk.image is now ready to become a physical device that can be added to a logical volume.

To create a new physical volume with the new disk image:

  1. Execute the pvcreate command as shown below:

    pvcreate /dev/hdc1

    Surrounding text describes pvcreate.gif.

See Also

  • For more information refer to the Linux man pages for the pvcreate command.

F.5 Extending the Volume Group with the New Physical Disk

To extending the volume group with the new physical disk:

  1. You must determine the name of the volume group to which the disk will be added by using the vgscan command. In the below example, the name of the volume group is VolGroup00.

    Surrounding text describes vgscan.gif.
  2. Using the volume group name found in the previous step, extend the volume group by using the vgextend command. The below example uses VolGroup00 as the volume group name.

    vgextend VolGroup00 /dev/hdc1

    Surrounding text describes vgextend.gif.

See Also

  • For more information refer to the Linux man pages for the vgextend command.

F.6 Extending the Logical Volume with the New Volume Group

As you did with the volume group, you must also extend the logical volume. To do so, you need to determine the logical volume name using the lvscan command. In this example, the logical volume name is LogVol01.

  1. Determine the logical volume name using the lvscan command. In this example, the logical volume name is LogVol01.

    Surrounding text describes lvscan.gif.
  2. Using the name of the logical volume returned by the lvscan command, extend the logical volume using the following command. In this example, the name of the logical volume is LogVol01.

    lvextend -l +100%FREE /dev/VolGroup00/LogVol01

    Surrounding text describes vgextend_logvol.gif.

    Note:

    The second command parameter of +100%FREE instructs the program to use all of the free space available on the new disk image. To use less than 100%, you would use a numerical value.

See Also

  • For more information refer to the Linux man pages for the vgextend command.

F.7 Resizing the File System

The final process is to resize the file system to enlarge the current LVM files system based on the size of the new disk image being added.

To resize the file system:

  1. Enter the resize2fs command:

    resize2fs /dev/VolGroup00/LogVol01

    Surrounding text describes resize.gif.
  2. Verify that the new disk image has been added by issuing the df -h command.

    Surrounding text describes verify_new_disk_image.gif.

Upon verification, you have successfully added a new disk image to you JD Edwards VM image.

See Also

  • For more information refer to the Linux man pages for the resize2fs command.

F.8 Logical Volume Manager Command Summary

This section provides a summary of the Logical Volume Manager commands using in this guide.

  • [fdisk]

    This is the disk utility command.

    To add a number 1 primary partition, use this syntax where subsequent values are entered at the command prompts:

    fdisk /dev/hdc
        n
        p
        1
        <enter>
        <enter>
    

    While still in the prompts for the preceding fdisk commands, to change the type of disk to LVM:

        t
        8e
    

    While still in the prompts for the preceding fdisk commands, to permanently save the changes to the disk:

        w
    
  • [pvcreate]

    Use this utility to initialize a disk or partition for use by LVM. For example:

    pvcreate /dev/hdc1

  • [vgscan]

    Use this command to scan all disks for volume groups and rebuild caches (returns names).

  • [vgextend]

    Use this command to add physical volumes to a volume group. For example:

    vgextend VolGroup00 /dev/hdc1

  • [lvscan]

    Use this command to scan all disks for Logical Volumes (returns names). For example:

  • [lvextend]

    Use this command to extend the size of a logical volume. For example:

    lvextend -l +100%FREE /dev/VolGroup00/LogVol01

  • [resize2fs]

    Use this command to resize the file system. For example:

    resize2fs /dev/VolGroup00/LogVol01