WebReinvent Internal Docs
System Admin

xcp-ng Troubleshooting

How to Increase Root Disk Size for xcp-ng

1. Backup Data:

Optional but Recommended

2. Create and Boot from Live USB:

  • Download Ubuntu ISO and create a bootable USB drive using tools like Rufus.
  • Insert the USB drive into the server.
  • Adjust your BIOS/UEFI settings to prioritize booting from the USB drive.

3. Launch GParted:

  • Once booted into the live environment, open GParted by accessing it from the application menu.

4. Resize the Partition:

  • In GParted, you'll see the disk partitions. For example:
           Sda5                part /var/log
           Sda2                part
           Sda1                part /
           Sda4                part /boot/efi
           Sda6               /swap partition
              unallocated space
    
  • Right-click on sda4 (/boot/efi) and choose the option to copy the partition.
  • Paste this copied partition into sda2.
  • delete sda4
  • Delete the Sda6 swap partition.

Now it should look like:

             Sda1                     part /
                    unallocated space

Resize sda1 (/):

  • Right-click on sda1 and select "Resize".
  • Increase the size as needed.

Create a new swap partition:

  • Create a 1GB partition and format it as a swap.
  • Apply all disk operations and verify the root size by running lsblk in the terminal.

5. Shutdown and Reboot

  • Shut down the server, remove the USB drive, and power on the server

Troubleshooting "Local storage" Issue and Adding a New Storage Repository in XCP-ng center

Troubleshooting Steps

  1. Identify Disk Information
  • Use the lsblk command to list available disks and partitions:
    lsblk
    
  1. Creation of New Volume Group
  • Try creating a new Volume Group on /dev/sda3:
    sudo pvcreate /dev/sda3
    sudo vgcreate new_vg_name /dev/sda3
    
  1. Create a Logical Volume (LV)
  • Attempt to create a Logical Volume (LV):
    sudo lvcreate -l 100%FREE -n xcpng_sr_name new_vg_name
    
  1. Adding a New Storage Repository

  • . Attach New SR in XCP-ng
    • Use xe sr-create to add the new SR:
      xe sr-create content-type=user device-config:device=/dev/new_vg_name/<SR_NAME> name-label="New_SR_NAME" shared=false type=lvm
      
      Replace <SR_NAME> and adjust the command according to the new SR details.
  1. Perform a Volume Group (VG) scan and activation
  • (VG) scan and activation:
    sudo vgscan
    sudo vgchange -ay
    
  1. Verification
  • Verify the addition of the new SR:
    xe sr-list
    
  • Ensure that the "New_SR" is listed among the available Storage Repositories in xcp-ng center .

Copyright © 2024