We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

4.4.17. Increasing the size of partitions on a VPS

Attention!

Before proceeding, be sure to create a server backup, and also save copies of all important data from the server yourself on your PC or in FTParchive.

Note

Changing the size of partitions may be necessary in case change the VPS tariff for a tariff with a larger amount of available disk space.

Partitions can be resized both with the help of specialized programs with a graphical interface, and with the help of console utilities.

To increase the size of a partition using the GParted program, do the following:
  1. Make sure that you created a server backup, and also saved copies of all important data from the server to your PC or FTParchive.
  2. Connect the image System Rescue CD the latest available version - the server will be automatically rebooted.
  3. If the main menu is displayed, select "Boot SystemRescueCd using default options»:
  4. Launch the GUI - enter the command startx and press Enter:
  5. Start the GParted application:
  6. Right-click on the section you want to enlarge and select "Resize/Move»:
  7. Use the arrows to expand the section to all the available space so that in the “Free space preceding"And"Free space following"Were zeros, and press"Resize/Move»:
  8. Click on the button to apply changes and confirm the operation:
  9. Wait for the successful completion of the operation:
  10. After server reboot connect to it via SSH and check check the size information:
    df -h
Resize2fs only supports ext2-ext4 file systems. If the server uses a different file system, use Gparted or in another way.

To increase the size of a partition using console commands, do the following:

  1. Make sure that you created a server backup, and also saved copies of all important data from the server to your PC or FTParchive.
  2. Connect the image System Rescue CD the latest available version - the server will be automatically rebooted.
  3. If the main menu is displayed, select "Boot SystemRescueCd using default options»:
  4. Wait for the command line prompt:
  5. Check the current disk layout:
    fdisk -l
  6. Run fdisk interactively:
    fdisk /dev/xvda
  7. In fdisk interactive mode, run the commands:
    1. List the current sections:
      p
    2. Delete the section you want to enlarge (only the markup is removed, the data itself is not affected):
      d
      3

      Instead 3 specify the number of the partition to be deleted. The numbers can be seen in the list of current sections.

    3. Create a new partition instead of the deleted one:
      n
      p
      3

      p - primary section (primary).
      Instead 3 specify the number of the partition to be created (it will be the same as that of the deleted one).
      When prompted for the start and end sectors, just press Enter.
      Important! Answer the request to remove the signature n.

    4. Check out the resulting markup:
      p
    5. Save changes:
      w
  8. Check the file system of the created partition:
    e2fsck -f /dev/xvda3

    Instead 3 specify the number of the created section.

  9. Resize the file system of the created partition:
    resize2fs /dev/xvda3

    Instead 3 specify the number of the created section.

  10. Exit the console:
    exit
  11. After server reboot connect to it via SSH and check check the size information:
    df -h