Reputation: 31
I had a 12TB ext4 partition which I wanted to extend to 18TB. I've added the new disks to the RAID and after doing that I wanted to re-size the partition to occupy this new space. I started the growth of the partition but the procedure failed because the ext4 cannot handle partitions bigger than 16TB.
The problem is that now when I open gparted, gparted shows that the size of the partition is 18TB but I can see only 12TB in Nautilus window.
How can I roll back the effects of the gparted operation so the two sizes are consistent with each other?
# resize2fs /dev/sda1
resize2fs 1.42.5 (29-Jul-2012)
resize2fs: New size too large to be expressed in 32 bits
Upvotes: 3
Views: 6875
Reputation: 3336
Please don't forget to expand the filesystem with the -p option, after the system has been converted to 64-bit, as explained in the link cited by Mivk.
umount /dev/$YOUR_DISK
e2fsck -f /dev/$YOUR_DISK
resize2fs -b /dev/$YOUR_DISK # Enable 64bit support in the filesystem
resize2fs -p /dev/$YOUR_DISK # Resize the filesystem
e2fsck -f /dev/$YOUR_DISK
mount ...
Upvotes: 2
Reputation: 14889
What you apparently really want is not to roll back your changes, but to be able to resize your file system to a size greater than the 16TB limit.
For that, you need a version of e2fsprogs >= 1.43 and then activate 64bit support with the -b
switch of resize2fs
. If yo have an older Ubuntu with e2fsprogs 1.42 or older, you can find backports of e2fsprogs in the Launchpad PPAs or compile it from source.
Once you have a recent enough version of e2fsprogs:
umount /dev/$YOUR_DISK
e2fsck -f /dev/$YOUR_DISK
resize2fs -b /dev/$YOUR_DISK
e2fsck -f /dev/$YOUR_DISK
mount ...
See this answer for more details.
Upvotes: 6