Jump to content

Increase size of ext4 to full size of Disk

Go to solution Solved by Noah0302,
22 minutes ago, Kilrah said:
resize2fs

with no arguments should resize to the partition size.

Thank you for the reply, but that did not work:
root@pbs-test01:~# resize2fs /dev/vdb
resize2fs 1.46.2 (28-Feb-2021)
resize2fs: Device or resource busy while trying to open /dev/vdb
Couldn't find valid filesystem superblock.

root@pbs-test01:~# resize2fs /dev/vdb1
resize2fs 1.46.2 (28-Feb-2021)
The filesystem is already 8388347 (4k) blocks long.  Nothing to do!

root@pbs-test01:~# resize2fs
resize2fs 1.46.2 (28-Feb-2021)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]
 
 

UPDATE: I managed to get it to extend with


 

sgdisk -e /dev/vdb

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

apt install parted
partprobe /dev/vdb

resize2fs /dev/vdb1

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, but the filesystem was still the same:

image.png.4940bc291aef1b5940ff43e29f1a3dee.png

 

How do I increase the filesystem to the full size of the disk, without losing any data?

 

 

Thanks for reading!

 

_____

 

UPDATE: I managed to get it to extend with


 

sgdisk -e /dev/vdb

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

apt install parted
partprobe /dev/vdb

resize2fs /dev/vdb1

 

My Gaming PC:
Inno3D iChill Black - RTX 4080 - +500 Memory, undervolted Core, 2xCorsair QX120 (push) + 2xInno3D 120mm (pull)
AMD Ryzen 7 7800X3D - NZXT x72
G.SKILL Trident Z @6000MHz CL30 - 2x16GB
Asus Strix X670E-E Gaming

1x500GB Samsung 960 Pro (Windows 11 + 10)

1x2TB Kingston KC3000 (Games)

1x1TB WD Blue SN550 (Programs)

1x1TB Samsung 870 EVO (Programs)
Corsair RM-850X + native 12VHPWR-Cable

Lian Li O11 Vision
Alienware 360 HZ QD-OLED AW2725DF, MSI Optix MAG274QRFDE-QD, BenQ ZOWIE XL2720

Logitech G Pro Wireless Superlight 2
Wooting 60HE

Audeze LCD2-C + FiiO K3

Klipsch RP600-M + Klipsch R-120 SW

 

My Notebook:

MacBook Pro 16 M1 Pro - 16GB

 

Proxmox-Cluster:

  • Ryzen 9 3950X, Asus Strix X570E F-Gaming, 4x32GB3200MHz ECC, 2x 512GB NVMe ZFS-Mirror (Boot, Testing-VMs + TrueNAS L2ARC), 2x14TB ZFS-Mirror + 1x3TB (TrueNAS-VM), 1x 1TB Samsung 980 Pro NVMe (Ceph-OSD), Dual 10G NIC (Ceph), 2.5G NIC (VMs), 1G NIC (Cluster)
  • i7 8700k delidded undervolted, Gigabyte Z390 UD, 4x16GB 3200MHz, 2x 360GB HDD ZFS-Mirror (Boot), 1x 1TB Samsung 980 Pro NVMe (Ceph-OSD), Dual 10G NIC (Ceph), 2.5G NIC (VMs), 1G NIC (Cluster)
  • i5 4670, 3x4GB + 1x8GB 1600MHz, 2x 240GB HDD ZFS-Mirror (Boot), 1x 1TB Samsung 980 Pro NVMe (Ceph-OSD), Dual 10G NIC (Ceph), 2.5G NIC (VMs), 1G NIC (Cluster)

Proxmox-Backup-Server:

  • i5 4670, 4x4GB 1600MHz, 2x2TB ZFS-Mirror, 2,5G NIC
Link to comment
Share on other sites

Link to post
Share on other sites

resize2fs

with no arguments should resize to the partition size.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Kilrah said:
resize2fs

with no arguments should resize to the partition size.

Thank you for the reply, but that did not work:
root@pbs-test01:~# resize2fs /dev/vdb
resize2fs 1.46.2 (28-Feb-2021)
resize2fs: Device or resource busy while trying to open /dev/vdb
Couldn't find valid filesystem superblock.

root@pbs-test01:~# resize2fs /dev/vdb1
resize2fs 1.46.2 (28-Feb-2021)
The filesystem is already 8388347 (4k) blocks long.  Nothing to do!

root@pbs-test01:~# resize2fs
resize2fs 1.46.2 (28-Feb-2021)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [-b|-s|new_size] [-S RAID-stride] [-z undo_file]
 
 

UPDATE: I managed to get it to extend with


 

sgdisk -e /dev/vdb

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

apt install parted
partprobe /dev/vdb

resize2fs /dev/vdb1

My Gaming PC:
Inno3D iChill Black - RTX 4080 - +500 Memory, undervolted Core, 2xCorsair QX120 (push) + 2xInno3D 120mm (pull)
AMD Ryzen 7 7800X3D - NZXT x72
G.SKILL Trident Z @6000MHz CL30 - 2x16GB
Asus Strix X670E-E Gaming

1x500GB Samsung 960 Pro (Windows 11 + 10)

1x2TB Kingston KC3000 (Games)

1x1TB WD Blue SN550 (Programs)

1x1TB Samsung 870 EVO (Programs)
Corsair RM-850X + native 12VHPWR-Cable

Lian Li O11 Vision
Alienware 360 HZ QD-OLED AW2725DF, MSI Optix MAG274QRFDE-QD, BenQ ZOWIE XL2720

Logitech G Pro Wireless Superlight 2
Wooting 60HE

Audeze LCD2-C + FiiO K3

Klipsch RP600-M + Klipsch R-120 SW

 

My Notebook:

MacBook Pro 16 M1 Pro - 16GB

 

Proxmox-Cluster:

  • Ryzen 9 3950X, Asus Strix X570E F-Gaming, 4x32GB3200MHz ECC, 2x 512GB NVMe ZFS-Mirror (Boot, Testing-VMs + TrueNAS L2ARC), 2x14TB ZFS-Mirror + 1x3TB (TrueNAS-VM), 1x 1TB Samsung 980 Pro NVMe (Ceph-OSD), Dual 10G NIC (Ceph), 2.5G NIC (VMs), 1G NIC (Cluster)
  • i7 8700k delidded undervolted, Gigabyte Z390 UD, 4x16GB 3200MHz, 2x 360GB HDD ZFS-Mirror (Boot), 1x 1TB Samsung 980 Pro NVMe (Ceph-OSD), Dual 10G NIC (Ceph), 2.5G NIC (VMs), 1G NIC (Cluster)
  • i5 4670, 3x4GB + 1x8GB 1600MHz, 2x 240GB HDD ZFS-Mirror (Boot), 1x 1TB Samsung 980 Pro NVMe (Ceph-OSD), Dual 10G NIC (Ceph), 2.5G NIC (VMs), 1G NIC (Cluster)

Proxmox-Backup-Server:

  • i5 4670, 4x4GB 1600MHz, 2x2TB ZFS-Mirror, 2,5G NIC
Link to comment
Share on other sites

Link to post
Share on other sites

Ah yes you haven't expanded the partition yet, you can use gparted for that.

 

Grow disk size -> grow partition to fill disk -> grow filesystem to fill partition

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×