Extending Datastore

Aug 18, 2020
20
3
23
37
Hello,

we have installed PBS as a vm on PVE. The vm has a virtual disk for the Backup Storage. (40 GB as Directory Storage)

Now i want to expand the Storage. At the PVE side i increased the virtual disk. A moment later PBS shows the new disk size. (50GB)

But the Datastore shows 40GB. How can i tell the Datastore to use the additional 10 GB?
 

Attachments

  • Screenshot 2020-11-16 132535.jpg
    Screenshot 2020-11-16 132535.jpg
    72.9 KB · Views: 58
  • Screenshot 2020-11-16 132642.jpg
    Screenshot 2020-11-16 132642.jpg
    55 KB · Views: 59
Last edited:
@fabian,

The link you referenced uses parted to extend the file system. PBS iso install does not include parted and will not install with apt-get install parted. So what is the next step?
 
I am in a similar position with you, but I am using ZFS for my datastore.
So I have enabled autoexpand for the zfs pool and the pool automatically expanded to fill the new Virtual Disk:
zpool set autoexpand=on backup
 
@fabian,

The link you referenced uses parted to extend the file system. PBS iso install does not include parted and will not install with apt-get install parted. So what is the next step?
You certainly should be able to install parted in a fresh debian, do you really mean that "apt update" and "apt install parted" is not installing it for you? What does "apt search ^parted" show?
 
Last edited:
Hello,

I have also installed PBS as vm on PVE with disks for datastore1 and datastore2. Currently also resized first disk and from PBS I run zpool set autoexpand=on datastore1 and disk was successfully resized. But on the tab ZFS datastore1 has original size. Could you please help me, how can I increase ZFS datastore?

Thank you
Daniel
 

Attachments

  • pbs_disk.JPG
    pbs_disk.JPG
    48.4 KB · Views: 44
  • pbs_zfs_datastore.JPG
    pbs_zfs_datastore.JPG
    50.6 KB · Views: 41
  • pve_pbs_disk.JPG
    pve_pbs_disk.JPG
    24.3 KB · Views: 40
You certainly should be able to install parted in a fresh debian, do you really mean that "apt update" and "apt install parted" is not installing it for you? What does "apt search ^parted" show?
Thank you @oversite for the reply. I guess I could have prefaced my post with my lack of experience in linux. Running apt update first did in fact allow install to run. I understand now why. I'm kicking myself for not thinking of that before I posted.
 
For others who may be struggling to extend a datastore....
(PBS installed in a PVE cluster. The pve virtual disk in PBS is /dev/sdb)

-resize disk in PVE
-verify resized disk in PBS -> administration -> storage/disks
-open PBS shell and run the following
Code:
parted /dev/sdb
(parted) print
Warning: Not all of the space available to /dev/sdb appears to be used, you can
fix the GPT to use all of the space (an extra ########### blocks) or continue
with the current setting?
Fix/Ignore? F
(parted) resizepart 1 Yes 100%
(parted) quit
(* I had to add "yes" to the resizepart line from the wiki tutorial)

Code:
resize2fs /dev/sdb1
(*this step can take some time)

-verify datastore extended
 
Last edited:
  • Like
Reactions: rwithd
For others who may be struggling to extend a datastore....
(PBS installed in a PVE cluster. The pve virtual disk in PBS is /dev/sdb)

-resize disk in PVE
-verify resized disk in PBS -> administration -> storage/disks
-open PBS shell and run the following
Code:
parted /dev/sdb
(parted) print
Warning: Not all of the space available to /dev/sdb appears to be used, you can
fix the GPT to use all of the space (an extra ########### blocks) or continue
with the current setting?
Fix/Ignore? F
(parted) resizepart 1 Yes 100%
(parted) quit
(* I had to add "yes" to the resizepart line from the wiki tutorial)

Code:
resize2fs /dev/sdb1
(*this step can take some time)

-verify datastore extended
Seems that parted is no longer included in PBS :(
 
-> apt update
-> apt install parted
-> fuser -v /mnt/datastore/ClusterDtStoreName
-> umount -l /mnt/datastore/ClusterDtStoreName
-> umount /mnt/datastore/ClusterDtStoreName
-> parted /dev/sdb resizepart 1 100%
-> mount /dev/sdb1 /mnt/datastore/ClusterDtStoreName
-> xfs_growfs /dev/sdb1

Should do it for xfs file system
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!