Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuring the File System after Extending the Disk

  1. Verify the current size of mount point /data:

    Code Block
    languagebash
    themeRDark
    df -h /data

    The system output should resemble the following:
    Image Modified

  2. Verify the new disk size:

    Code Block
    languagebash
    themeRDark
    fdisk -l | grep /dev/sdc

    The system output should resemble the following:

    Image Modified

  3. Use fdisk to create a new partition for the new size:

    Code Block
    languagebash
    themeRDark
    fdisk /dev/sdc


    1. Press p to print the partition table to identify the number of partitions:
      Image Modified
      If this is the first time the disk is extended, you should only see sdc1. If this is a subsequent extension - you will see additional sdcX listed (e.g. sdc2 for the second extension).
    2. Press n to create a new primary partition.
    3. Press p for primary.
    4. When the system prompts for a partition number, enter the next number depending on the output of the partition table print.
      If this is the first extension and you see only one row of output - enter 2. If this is the second disk extension then the partition number will be 3, and so on.
    5. Press Enter twice
      Image Modified
    6. Press t to change the system's partition ID.
    7. Press 2 to select the newly created partition (Remember: if this is a subsequent disk extension - the number will be 3 or higher).
    8. Type 8e to change the Hex Code of the partition for Linux LVM.
    9. Press w to write the changes to the partition table.

      Image Modified

      Note

      The following warning is valid, the system reboot will fix the issue:
      “WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8)”


  4. Reboot the system:

    Code Block
    languagebash
    themeRDark
    reboot


  5. When the system is available again, ensure the new partition is available:

    Code Block
    languagebash
    themeRDark
    fdisk -l | grep /dev/sdc

    The system output should resemble the following (note the new sdcX added):
    Image Modified

  6. Stop the application by running app-util.sh and selecting option 2 (stop all).

  7. Create a new LVM Physical Volume (PV):

    Note

    If the new partition is not sdc2, substitute sdc2 for the right qualifier in all the following commands


    Code Block
    languagebash
    themeRDark
     pvcreate /dev/sdc2
  8.  Extend

  9. Extend the LVM Volume Group (VG):

    Code Block
    languagebash
    themeRDark
    vgextend vg_data /dev/sdc2


  10. Extend the LVM Logical Volume (LV):

    Code Block
    languagebash
    themeRDark
    lvextend -l +100%FREE /dev/vg_data/lv_data


  11. Identify the /data file system type (for CentOS 7.2+ based appliances the type is xfs):

    Code Block
    languagebash
    themeRDark
    cat /etc/fstab |grep /data

    The system output should resemble the following:
    Image Modified

  12.  Resize

  13. Resize the file system. Select the correct command below for your file system type:

    Code Block
    languagebash
    themeRDark
    titleFor ext4
    resize2fs /dev/vg_data/lv_data


    Code Block
    languagebash
    themeRDark
    titleFor xfs
    xfs_growfs /dev/vg_data/lv_data


    The system output should resemble the following:
    Image Modified

  14. Display the new size of the /data mount point:

    Code Block
    languagebash
    themeRDark
    df -h /data


Option 2: Adding an Additional Data Disk

...