Comprehensive data protection for all workloads
Post Reply
Rasputin
Lurker
Posts: 2
Liked: 2 times
Joined: Apr 12, 2024 9:16 am
Contact:

Extend partition on Backup repository VM without losing data

Post by Rasputin »

Hi,
I have a VM with RHEL which serves as backup repo for Veeam. And now I need to extend partition for backups. Original size was 17TB, I extended HDD in VMware to 19TB (it's a second HDD in VMware), and I restarted VM. After restart, in fdisk -l output I see some information about 19TB virtual disk, but the backup path is still 17 TB - /backup(/dev/mapper/vg02-backup). What its a next steps for extend partition? There is also a question whether to use it fdisk or gdisk? Output fdisk -l after reboot a VM its:

Device Start End Sectors Size Type
/dev/sda1 2048 1230847 1228800 600M EFI System
/dev/sda2 1230848 3327999 2097152 1G Linux filesystem
/dev/sda3 3328000 108201983 104873984 50G Linux LVM
The backup GPT table is not on the end of the device. I am worried about this warning

Disk /dev/sdb: 19 TiB, 20890720927744 bytes, 40802189312 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 952E38DA-AC78-DD44-AF19-B31C2FD62B00

Device Start End Sectors Size Type
/dev/sdb1 2048 27917287390 27917285343 13T Linux filesystem
/dev/sdb2 27917287424 36507221982 8589934559 4T Linux filesystem Here I don't know why it is divided to sdb1 and sdb2, and which partition actually needs to be expanded

Disk /dev/mapper/vg02-backup: 17 TiB, 18691689283584 bytes, 36507205632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

When i use fdisk /dev/sdb output its
The backup GPT table is not on the end of the device. This problem will be corrected by write.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.

Can you please advise me on the next procedure(steps), it is also necessary to perform an unmount, and of course without losing data on this partition.

Thank You
mjr.epicfail
Veeam Legend
Posts: 419
Liked: 119 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: Extend partition on Backup repository VM without losing data

Post by mjr.epicfail »

To be honest, this is more a linux question than a Veeam question.
To be more precise, an LVM question.

You can leverage LVM to increase the partition and filesystem.
https://www.redhat.com/sysadmin/resize-lvm-simple
VMCE / Veeam Legend 2*
Rasputin
Lurker
Posts: 2
Liked: 2 times
Joined: Apr 12, 2024 9:16 am
Contact:

Re: Extend partition on Backup repository VM without losing data

Post by Rasputin » 2 people like this post

Hi, Thank You fo reply, but, I solved the problem as follows(advice from another forum). In case someone solves a similar problem.the solution for me is:



Install the growpart utility (Package name might be cloud-utils-growpart in some distributions), then run:

sudo growpart /dev/sdb 2 #yes, with the space
sudo pvresize /dev/sdb2

Then the new capacity will be usable in LVM as usual. To add all of it to your backup LV:

sudo lvextend -l +100%FREE -r /dev/mapper/vg02-backup
mjr.epicfail
Veeam Legend
Posts: 419
Liked: 119 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: Extend partition on Backup repository VM without losing data

Post by mjr.epicfail »

Good to hear you fixed it !
VMCE / Veeam Legend 2*
Post Reply

Who is online

Users browsing this forum: Google [Bot], MarkBoothmaa and 82 guests