주 콘텐츠로 건너뛰기

Increasing your disk space (Ubuntu)

Disk Management에서
저자 리스트
발표됨: 2023년 11월 30일|최종 업데이트됨: 2023년 11월 30일

This guide will cover a standard Ubuntu 22.04 installation. If you are not using a standard Ubuntu 22.04 installation then we recommend looking for guides for your specific OS or filesystem you used.

Warning

We highly recommend performing a full VM backup before performing any work managing the disks on your Deskpro server.

What is LVM?Copy link to What is LVM? to clipboard

LVM, or Logical Volume Management is the default method which Ubuntu will use to manage disk mounts. It is an additional layer which sits atop of standard disk partitioning, but below the filesystem. This allows for more flexibility with managing mounts, but also adds some additional complexity.

LVM uses 3 distinct layers, Physical Volumes, Volume Groups and Logical Volumes.

  • Physical Volumes - These are the sections of the disk partitions which you want to add to LVM.

  • Volume Groups - These are groups which hold the Physical Volumes, and make the space available to Logical Volumes.

  • Logical Volumes - These are the disk mounts which will hold the filesystem, and will be mounted to your OS.

This method allows your OS to separate the disk mounts from the physical disk, meaning that you can have a logical volume that spans multiple physical volumes within the volume group.

image.png

With the example diagram above, the logical volume spans both physical volumes within the volume group, meaning if you have 2 x 50GB disks, the logical volume can be up to 100GB in size. The filesystem is then placed on top of the logical volume and mounted to the OS.

Do I have unused space available?Copy link to Do I have unused space available? to clipboard

Note

Any command mentioned below must be run as the root user on the command line of your server.

By default, Ubuntu does not allocate the full disk space on installation, so if you have installed Ubuntu from an ISO and did not allocate the full disk to the root partition, you may have some unallocated space on your disk which you can assign to grow your root partition quickly and easily.

You can check if you have any unallocated space by running the command vgdisplay, then checking for the Free PE / Size. If you have any unallocated space within your volume group, you can follow the Growing the Logical Volume guide to allocate it.

root@deskpro:~# vgdisplay --- Volume group --- VG Name ubuntu-vg System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size <98.00 GiB PE Size 4.00 MiB Total PE 25087 Alloc PE / Size 12543 / <49.00 GiB Free PE / Size 12544 / 49.00 GiB VG UUID 02DpQ3-gT1C-Xvfd-vumL-7rHi-S4P3-ioxBdt
copy

Increasing disk space on a standard Ubuntu installation.Copy link to Increasing disk space on a standard Ubuntu installation. to clipboard

There are two main ways to increase your disk space on Ubuntu.

  1. Expanding your existing disk

This requires you to increase the size of your existing disk within your hypervisor. It will keep all your data on the same virtual disk.

  1. Adding an additional disk

This requires you to add an additional disk within your hypervisor. This will span your data across multiple disks.

Both these methods will grow the free space within the Volume Group, and are completed by Growing the Logical Volume to allocate the free space to your filesystem.

도움이 되었습니다도움이 되지 않음

이 페이지가 도움이 된다고 생각하는 사람들의 수 2 / 3

Increasing your disk space (Ubuntu) 내의 페이지

Expanding your existing disk
저자 리스트
발표됨: 2023년 11월 30일
최종 업데이트됨: 2023년 11월 30일
Adding an additional disk
저자 리스트
발표됨: 2023년 11월 30일
최종 업데이트됨: 2023년 11월 30일
Growing the Logical Volume
저자 리스트
발표됨: 2023년 11월 30일
최종 업데이트됨: 2023년 11월 30일
다음 페이지Increasing disk space on the OVA
이전 페이지How much disk space do I have available?

댓글을 작성하려면 로그인하거나 등록하셔야 합니다.