C Increasing the Size of the Logical Volume Group of a vServer

When ExaBR backs up a vServer using LVM-based snapshots, it uses the swap space of the vServer to take the snapshot. However, if ExaBR finds enough free space in the default Volume Group (VolGroup00) it does not use the swap space of the vServer. This appendix describes how to increase the size of the default Volume Group (VolGroup00) of a guest vServer to ensure that ExaBR uses the unused space of the default Volume Group for the snapshot, and not the swap space of the vServer.

Note:

The procedure described in this chapter is relevant to vServers created by using the EECS 2.0.6 Guest Base Template only. Do not use this procedure to modify the disks of vServers creating using a Guest Base Template that is earlier than EECS version 2.0.6.

You can increase the size of the Volume Group, by performing the following tasks:

  1. Create a volume.

  2. Attach the volume to the vServer.

  3. Format and add the volume to the default Volume Group of the vServer.

C.1 Creating a Volume

To create a volume, complete the following steps:

  1. Log in to the Exalogic Control BUI as a Cloud User.

  2. From the left navigation pane, click vDC Management.

  3. Under vDC Accounts, click the name of your account, such as Dept1.

    The vDC Account dashboard is displayed.

  4. Click Storage on the top navigation bar.

  5. Click the Volumes tab.

  6. Under Volumes, click the + icon.

  7. In the Volume Name field, enter a name for the volume. For example, Volume1.

  8. In the Description field, enter a short description.

  9. Click Next.

  10. Do not select the Shared option.

  11. Set the size of the volume in GB. Oracle recommends setting the size of the volume to at least 2 GB.

  12. Click Next.

    The Volume Summary screen is displayed.

  13. Review the summary, and click Finish to create the volume in your account.

C.2 Attaching the Volume to a vServer

You can attach a volume to a vServer as follows:

  1. Log in to the Exalogic Control BUI as a Cloud User.

  2. From the left navigation pane, click vDC Management.

  3. Under vDC Accounts, expand the name of your account, such as Dept1.
    All the vServers in the account are displayed.

  4. Select the vServer (for example, vserver2) to which you wish to attach a volume.
    The vserver2 dashboard is displayed.

  5. From the actions pane on the right, click Stop vServer. Wait till the job succeeds in the jobs pane.

  6. From the actions pane on the right, click Attach vServer Volumes.
    The Attach vServer Volumes wizard is displayed.

  7. Select the volume you wish to attach to vserver2.

  8. Click the right arrow icon.

  9. Click Next.
    The confirmation screen is displayed.

  10. Click Finish. Wait till the job succeeds in the jobs pane.

  11. From the actions pane on the right, click the Start vServer button to restart the vServer.

C.3 Formatting the Volume on the vServer

Format the volume on the vServer, by doing the following:

  1. Log in to the vServer as the root user.

  2. Examine the current partitioning by running the following command:

    # df -h
    

    The following is an example of the output of this command:

    Filesystem                       Size  Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00  5.1G  3.3G  1.6G  68% /
    /dev/xvda1                        99M   23M   71M  25% /boot
    tmpfs                            4.0G     0  4.0G   0% /dev/shm
    
  3. Examine the available physical volumes on the vServer by running the following command:

    # cat /proc/partitions
    major minor  #blocks  name
     
     202        0    6145024 xvda
     202        1     104391 xvda1
     202        2    6040440 xvda2
     253        0    5505024 dm-0
     253        1     524288 dm-1
     202       16  104857600 xvdb
    

    /dev/xvdb is the newly attached volume.

  4. Run the fdisk command, as shown in the following example:

    Note:

    The user input required at various stages while running the fdisk command is indicated by bold text.
    # fdisk /dev/xvdb
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that, of course, the previous
    content won't be recoverable.
    
    The number of cylinders for this disk is set to 13054.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
    (e.g., DOS FDISK, OS/2 FDISK)
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
    Command (m for help): p
     
    Disk /dev/xvdb: 107.3 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
     
        Device Boot      Start         End      Blocks   Id  System
     
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-13054, default 1):
    Using default value 1
    Last cylinder or +size or +sizeM or +sizeK (1-13054, default 13054):
    Using default value 13054
     
    Command (m for help): t
    Selected partition 1
    Hex code (type L to list codes): 8e
    Changed system type of partition 1 to 8e (Linux LVM)
     
    Command (m for help): p
     
    Disk /dev/xvdb: 107.3 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
     
        Device Boot      Start         End      Blocks   Id  System
    /dev/xvdb1               1       13054   104856223+  8e  Linux LVM
     
    Command (m for help): w
    The partition table has been altered!
     
    Calling ioctl() to re-read partition table.
    Syncing disks.
    
  5. Create a physical volume:

    # pvcreate /dev/xvdb1
      Writing physical volume data to disk "/dev/xvdb1"
      Physical volume "/dev/xvdb1" successfully created
     
     
    
  6. Extend the volume group VolGroup00 with the physical volume /dev/xvdb1:

    # vgextend VolGroup00 /dev/xvdb1
      Volume group "VolGroup00" successfully extended
     
    
  7. Verify that the volume group was extended successfully, by running the following command:

    # vgs
    VG         #PV #LV #SN     Attr  VSize  VFree
    VolGroup00   2   2   0   wz--n-   7.5G   3.6G
    

    The amount of free space appears under the VFree column.