Increase size of PBS Datastore Directory

Noah0302

Member
Jul 21, 2022
49
5
8
Edit: fixed it in my latest comment!

----------

Hello guys,


I'm running PBS 2.2-6 on my TrueNAS SCALE as a VM.
I started out with a 6TB Volume for my PBS Storage and a 32GB Volume for my PBS Boot drive.


The Storage started to fill up, so i increased the 6TB Volume to 11TB.
After a Reboot PBS did recognize the change from 6 to 11TB:
1664958741611.png

The directory did stay the same size though:
1664958807968.png
1664958848006.png

I could not find anywhere how to increase the Datastore to the full size of the Disk, only with ZFS wich I don't use within PBS, so I would greatly appreciate any help!



Thanks for reading.
 
Last edited:
After extending the disk size, you usually need to extend the filesystem as well. Did you do that? With resize2fs you should be able to extend the filesystem. Be aware that while this is relatively harmless, such operations always carry a slight chance of some mishap happening, so if you have very critical data on that disk it might be wise to have backups ready. That being said, I have often done online resizing and never had an issue - just a disclaimer.
 
Last edited:
After extending the disk size, you usually need to extend the filesystem as well. Did you do that? With resize2fs you should be able to extend the filesystem. Be aware that while this is relatively harmless, such operations always carry a slight chance of some mishap happening, so if you have very critical data on that disk it might be wise to have backups ready. That being said, I have often done online resizing and never had an issue - just a disclaimer.
Hello, thanks for the reply.

No, I have not yet done that. I also have not done that at all so far, I'm pretty new to Linux filesystems.
How would I go about doing this? I want to extend the PBS-Storage02 to the full size of the disk (from 6TB to 11TB)
1664959670654.png


If I understand correctly, I would need to run:
1. gparted
2. resize2fs /dev/vdb1



I created a manual Snapshot of the Storage disk in TrueNAS, in case anything goes wrong, I should be able to rollback.
 
Can you post the output of fdisk -l /dev/vdb ?
 
Can you post the output of fdisk -l /dev/vdb ?
Sure:
1664960341178.png

and in code form:
Code:
root@CNE-PBS01:~# fdisk -l /dev/vdb                                                                               
The backup GPT table is not on the end of the device.                                                             
Disk /dev/vdb: 10 TiB, 10995116277760 bytes, 21474836480 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                                                                 
Disklabel type: gpt                                                                                               
Disk identifier: 6CF955F6-2F0D-4232-8D61-534B29D164DA                                                             
                                                                                                                  
Device     Start         End     Sectors Size Type                                                                 
/dev/vdb1   2048 12884901918 12884899871   6T Linux filesystem
 
Okay, thanks.

So yes, you need to first increase the size of your partition and then the size of the filesystem afterwards. As you already said you can do this with gparted (GUI) or you can also use fdisk in the CLI if you are comfortable with that. After you have resized your partition, you have to run resize2fs /dev/vdb1 to also extend the filesystem. So yes, your approach is correct.
 
  • Like
Reactions: Noah0302
Okay, thanks.

So yes, you need to first increase the size of your partition and then the size of the filesystem afterwards. As you already said you can do this with gparted (GUI) or you can also use fdisk in the CLI if you are comfortable with that. After you have resized your partition, you have to run resize2fs /dev/vdb1 to also extend the filesystem. So yes, your approach is correct.
Thank you very much!

I'll try it out and see if it works :)
 
Okay, thanks.

So yes, you need to first increase the size of your partition and then the size of the filesystem afterwards. As you already said you can do this with gparted (GUI) or you can also use fdisk in the CLI if you are comfortable with that. After you have resized your partition, you have to run resize2fs /dev/vdb1 to also extend the filesystem. So yes, your approach is correct.
It worked!


I used the following commands, in case someone needs it in the future:

sgdisk -e /dev/vdb

sgdisk -d 1 /dev/vdb sgdisk -N 1 /dev/vdb

apt install parted partprobe /dev/vdb

resize2fs /dev/vdb1



Screenshots:
1664966768829.png1664966750688.png
 
Last edited:

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!