Skip to main content
All CollectionsKnowledge BaseEnterprise WorkloadsHow To - Enterprise Workloads
How to Increase the Cloudcache R1 and R3 data disk from 1 TB
How to Increase the Cloudcache R1 and R3 data disk from 1 TB
Updated over 2 weeks ago

Problem description:

Default Cloudcache data disk which 1 TB is full i.e 100%, or a larger deployment size is needed.

Filesystem: /dev/mapper/vg1-vol1
Mounted on : /mnt/data
Use%: 100%

Cause

Cloudcache store size is full

Resolution

When you need to increase the size of an existing disk in a Linux environment, follow these steps:

  1. Increase Disk Size in VMware

    1. Navigate to the settings of your virtual machine in VMware.

    2. Increase the size of the desired disk. For example, extend the disk to 400 GB.

  2. Connect to the Linux Server

    1. Use a terminal client like PuTTY to log in to the Linux server.

  3. Verify Current Disk Size and Structure

    1. Run the following commands to check disk usage and structure:
      df -h: Displays disk usage and mounted partitions.
      fdisk -l: Lists all available disks and partitions.

    2. Example output:
      #df -h
      Filesystem Size Used Avail Use% Mounted on
      /dev/sda1 20G 10G 10G 50% /
      # fdisk -l
      Disk /dev/sda: 40 GB, 40000000000 bytes

  4. Resize the Physical Volume

    1. Use the pvresize command to resize the physical volume so the system recognizes the increased size:
      pvresize /dev/sdb

    2. Replace /dev/sdb with the correct disk name identified in step 3.

  5. Extend the Logical Volume Group (VG)

    1. Extend the volume group to use the newly added space:
      lvextend --size +1.21T /dev/mapper/vg1-vol1

    2. Replace 1.21T with your required size or use +100%FREE to allocate all available space.

  6. Resize the Filesystem

    1. Expand the filesystem to utilize the new space:

    2. For ext4 or similar filesystems:
      resize2fs /dev/mapper/vg1-vol1

    3. For XFS:
      xfs_growfs /dev/mapper/vg1-vol1

  7. Verify the New Size

    • Check the updated size: df -h

Adding an Additional Disk in Linux

Adding a new disk to your system involves initializing the disk and incorporating it into your volume group.

  1. Shutdown the Virtual Machine

    1. Power off the virtual machine before adding the new disk.

  2. Attach a New Volume in VMware

    1. Add a new virtual disk to the machine with the desired size (e.g., 400 GB).

  3. Power on the Virtual Machine

    1. Start the virtual machine and log in via SSH.

  4. Identify the New Disk

    1. Run the following command to identify the newly added disk:
      fdisk -l | grep -i /dev/sd

    2. Example output:

      • Disk /dev/sdc: 400 GB, 400000000000 bytes

      • Here, /dev/sdc is the new disk.

  5. Initialize the New Disk as a Physical Volume

    1. Format the new disk for use with LVM:
      pvcreate /dev/sdc

  6. Extend the Volume Group

    1. Add the new physical volume to your existing volume group:
      vgextend vg1 /dev/sdc

  7. Extend the Logical Volume

    1. Allocate the free space to the logical volume and resize the filesystem:
      lvextend -l +100%FREE /dev/mapper/vg1-vol1 -r

    2. The -r flag automatically resizes the filesystem.

  8. Verify the New Size

    1. Check the updated volume and filesystem size:
      df -h vgs

Example for Adding a 400 GB Disk

For a scenario where you’ve added a 400 GB disk (/dev/sdc):

  1. Initialize the disk:

    pvcreate /dev/sdc

  2. Extend the volume group:

    vgextend vg1 /dev/sdc

    2023-09-11 19_46_06-How to Increase the Cloudcache R1 data disk from 1 TB - Druva Documentation.png
  3. Extend the logical volume and resize the filesystem:

    lvextend -l +100%FREE /dev/mapper/vg1-vol1 -r

  4. Verify the size:

    df -h vgs

    2023-09-06 12_16_14-Clipboard.png
Did this answer your question?