Re: Resize a VM: any risk involved ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I'm using VirtualBox for a few VMs, the biggest one is a Ubuntu 20.04 that
ocassionally grows too small, so I use virtualbox tools to enlarge the disk
then boot up something that h as gparted in it and use gparted to
stretch/move partitions.

Not being familiar with (i.e., not having used) KVM I can't say what's the
best way, but it seems to me that gparted would be easier than the steps
you described., once you've changed the partition size.

On Thu, Apr 8, 2021 at 11:43 AM Nicolas Kovacs <info@xxxxxxxxxxxxx> wrote:

> Hi,
>
> I'm currently fiddling with KVM, Proxmox and various VMs.
>
> I setup a very basic VM with a manual (fdisk) partitioning scheme: one
> /boot
> partition, one swap partition, and one root partition, the latter being the
> last partition and thus expandable).
>
> I'm starting with a reduced disk size (6 GB in total) and a minimal
> installation. The idea behind this approach is that I can clone this
> minimal VM
> and then eventually expand it to fit my needs.
>
> Here's how I expand the available disk size.
>
> First I increase the virtual disk in the hypervisor.
>
> Then I fire up the VM and do the following:
>
> # yum install cloud-utils-growpart
> # lsblk
> # growpart -v /dev/sda 3
> # resize2fs /dev/sda3
>
> Now here's my question (finally): is there any risk involved in this sort
> of
> operation? Or can it be performed on a production system without having to
> worry about data loss?
>
> Cheers from the sunny South of France,
>
> Niki
>
> --
> Microlinux - Solutions informatiques durables
> 7, place de l'église - 30730 Montpezat
> Site : https://www.microlinux.fr
> Blog : https://blog.microlinux.fr
> Mail : info@xxxxxxxxxxxxx
> Tél. : 04 66 63 10 32
> Mob. : 06 51 80 12 12
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux